postcss-font-grabber
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -45,6 +45,9 @@ "use strict"; | ||
function getFontFilename(fontUriObject) { | ||
if (!fontUriObject.pathname) { | ||
return helpers_1.md5(url_1.default.format(fontUriObject)); | ||
if (fontUriObject.pathname) { | ||
const baseName = path_1.default.basename(fontUriObject.pathname); | ||
if ((baseName === null || baseName === void 0 ? void 0 : baseName.indexOf('.')) !== -1) { | ||
return baseName; | ||
} | ||
} | ||
return path_1.default.basename(fontUriObject.pathname); | ||
return helpers_1.md5(url_1.default.format(fontUriObject)); | ||
} | ||
@@ -51,0 +54,0 @@ exports.getFontFilename = getFontFilename; |
{ | ||
"name": "postcss-font-grabber", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Grab remote font files in @font-face, download them and update your CSS, just like that.", | ||
@@ -21,3 +21,4 @@ "author": "AaronJan <aaronjan@qq.com>", | ||
"test:cov": "jest --coverage", | ||
"build": "tsc" | ||
"build": "tsc", | ||
"prepare": "npm run build" | ||
}, | ||
@@ -24,0 +25,0 @@ "keywords": [ |
@@ -52,3 +52,3 @@ <h1 align=center> | ||
const postcss = require('gulp-postcss'); | ||
const postcssFontGrabber = require('postcss-font-grabber'); | ||
const { postcssFontGrabber } = require('postcss-font-grabber'); | ||
@@ -55,0 +55,0 @@ return gulp.src('src/css/**/*.css') |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52713
497