nfroidure/gulp-svgicons2svgfont

es6 compile error

bastoune opened this issue · 5 comments

Since recently I do have this error running my default gulp task :

    gutil.log(...['gulp-svgicons2svgfont:'].concat(
              ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/bastien/www_dev/mushin-webapp/node_modules/gulp-iconfont/src/index.js:4:24)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)

here is my code

var gulp = require('gulp');
var iconfont = require('gulp-iconfont');
var iconfontCss = require('gulp-iconfont-css');
var watch = require('gulp-watch');

gulp.task('icons', function () {
    return gulp.src('src/assets/icons/**/*')
        .pipe(iconfontCss({
            fontName: 'mushin-icons',
            path: 'src/assets/css/icons_template.scss',
            fontPath: '../fonts/icons/',
            targetPath: '../../css/icons.scss',
            cssClass: 'mu-icon'
        }))
        .pipe(iconfont({
            fontName: 'mushin-icons',
            formats: ['ttf', 'eot', 'woff', 'woff2', 'svg'],
            normalize: true,
            centerHorizontally: true
        }))
        .pipe(gulp.dest('src/assets/fonts/icons'))
});

gulp.task('default', function () {
    gulp.start('icons');
});

Here my gulp versions :

"gulp": "^3.9.*",
    "gulp-clean-css": "^2.0.*",
    "gulp-iconfont": "^8.0.*",
    "gulp-iconfont-css": "^2.1.*",
    "gulp-watch": "^4.3.*",

This was introduced by the following checkin : Checkin 4c22ff5 - Update dependencies

what shall I do ?
Fix the 3.0.1 version ?

If you can get away with it comment out the call to pull this file do that or fix this file. Unless you are changing iconfont alot then do you really need this gulp file?

You should revert to a prior version since this is a semver issue.

I will create a new patch version that revert the last commit and create a major version that will only support the last NodeJS LTS for which the current code works.