[build] fix build iconfont (#2091)

This commit is contained in:
neverland 2018-11-15 17:53:48 +08:00 committed by GitHub
parent e14b43e66a
commit 09d53714a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ gulp.task('ttf', () => {
iconfontCss({ iconfontCss({
fontName: config.name, fontName: config.name,
path: template, path: template,
targetPath: '../icon/index.css', targetPath: '../icon/index.less',
normalize: true, normalize: true,
firstGlyph: 0xf000, firstGlyph: 0xf000,
cssClass: ttf // this is a trick to pass ttf to template cssClass: ttf // this is a trick to pass ttf to template
@ -66,7 +66,7 @@ gulp.task('ttf', () => {
gulp.task('default', ['ttf'], () => { gulp.task('default', ['ttf'], () => {
// generate icon-local.css // generate icon-local.css
fs.writeFileSync( fs.writeFileSync(
path.join(iconDir, 'local.css'), path.join(iconDir, 'local.less'),
local(config.name, ttf) local(config.name, ttf)
); );