D
D
drtvader2017-04-07 15:38:04
gulp.js
drtvader, 2017-04-07 15:38:04

What is causing the build error?

Hey!
After the manipulations of the colleagues, there were some errors in the assembly.
'iconfont' errored after 3.74 s
Error in plugin 'gulp-ttf2woff'
Here is the iconfont task:

'use strict';

const $      = require('gulp-load-plugins')();
const gulp   = require('gulp');
const config = require('../../../config');

var runTimestamp = Math.round(Date.now() / 1000),
    fontName     = config.iconfont.fontName;

/*
 * Build icon fonts
 */
module.exports = function(options) {
    return config.wrapPipe(function(success, error) {
        return gulp.src(config.iconfont.src)
            .pipe($.iconfontCss({
                fontName:   fontName,
                path:       'node_modules/gulp-iconfont-css/templates/_icons.less',
                targetPath: '../../src/style/partials/icons.less',
                fontPath:   '../fonts/'
            }))
            .pipe($.iconfont({
                fontName:      fontName,
                appendUnicode: true,
                formats:       ['ttf', 'eot', 'woff', 'svg', 'woff2'],
                timestamp:     runTimestamp,
                normalize:     true,
                fontHeight:    1001,
            }))
            .pipe(gulp.dest(config.iconfont.dest));
    });
};

How to cure? Google didn't help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
drtvader, 2017-04-07
@drtvader

Issue resolved, svg sucks.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question