【问题标题】:Problem with gulp iconfonts, what i missing?gulp iconfonts的问题,我错过了什么?
【发布时间】:2021-06-14 15:45:11
【问题描述】:

问题出在哪里? https://i.ibb.co/L0PsxWV/Screenshot-5.png

我已经安装了 gulp 3.9.1 和 NODE.js 10.13.3...

"use strict";

var iconfont = require('gulp-iconfont');
var runTimestamp = Math.round(Date.now()/1000);

gulp.task('Iconfont', function(){
  return gulp.src(['src/icons/*.svg'])
    .pipe(iconfont({
      fontName: 'myfont', // required
      prependUnicode: true, // recommended option
      formats: ['ttf', 'eot', 'woff'], // default, 'woff2' and 'svg' are available
      timestamp: runTimestamp, // recommended to get consistent builds when watching files
    }))
      .on('glyphs', function(glyphs, options) {
        // CSS templating, e.g.
        console.log(glyphs, options);
      })
    .pipe(gulp.dest('src/fonts/'));
});

【问题讨论】:

    标签: javascript node.js gulp


    【解决方案1】:

    在 gulpfile.js 的顶部添加:

    var gulp = require('gulp')

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-23
      • 1970-01-01
      • 1970-01-01
      • 2021-09-04
      • 1970-01-01
      • 2016-08-01
      • 2023-03-22
      相关资源
      最近更新 更多