Skip to content

Commit

Permalink
Remove unnecessary dependency url-join
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk committed Nov 7, 2024
1 parent eb1d01d commit a136e78
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
5 changes: 0 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
"ttf2eot": "^3.0.0",
"ttf2woff": "^3.0.0",
"ttf2woff2": "^6.0.1",
"underscore": "^1.9.1",
"url-join": "^5.0.0"
"underscore": "^1.9.1"
},
"devDependencies": {
"file-type": "^19.6.0",
Expand Down
4 changes: 2 additions & 2 deletions src/renderCss.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as fs from 'fs'
import * as crypto from 'crypto'
import * as url from 'url'
import _ from 'underscore'
import handlebars from 'handlebars'
import urlJoin from 'url-join'

/** Caclulates hash based on options and source SVG files */
var calcHash = function(options) {
Expand All @@ -24,7 +24,7 @@ var makeUrls = function(options) {
var baseUrl = options.cssFontsUrl && options.cssFontsUrl.replace(/\\/g, '/')
var urls = _.map(options.types, function(type) {
var fontName = options.fontName + '.' + type + '?' + hash
return baseUrl ? urlJoin(baseUrl, fontName) : fontName
return baseUrl ? url.resolve(baseUrl.replace(/\/*$/, '/'), fontName) : fontName
})
return _.object(options.types, urls)
}
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1397,11 +1397,6 @@ unique-slug@^4.0.0:
dependencies:
imurmurhash "^0.1.4"

url-join@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/url-join/-/url-join-5.0.0.tgz#c2f1e5cbd95fa91082a93b58a1f42fecb4bdbcf1"
integrity sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==

util-deprecate@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
Expand Down

0 comments on commit a136e78

Please sign in to comment.