Skip to content

Commit

Permalink
support filename
Browse files Browse the repository at this point in the history
  • Loading branch information
njleonzhang committed Nov 12, 2019
1 parent 72da8d4 commit 722a746
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function getFontFamily(fontInfo, ttf, opts) {
* @param {boolean=} opts.glyph generate class for each glyph. default = false
* @param {boolean=} opts.base64 inject base64
* @param {string=} opts.iconPrefix icon prefix
* @param {string=} opts.filename set filename
* @param {(string|FontFamilyTransform)=} opts.fontFamily fontFamily
* @return {Object} stream.Transform instance
* @api public
Expand Down Expand Up @@ -140,7 +141,7 @@ module.exports = function (opts) {
this.push(file.clone(false));

file.path = replaceExt(file.path, '.css');
var fontFile = path.basename(file.path, '.css');
var fontFile = opts.filename || path.basename(file.path, '.css');

// font data
var fontInfo = {
Expand Down

0 comments on commit 722a746

Please sign in to comment.