nfroidure / gulp-svgicons2svgfont

Bundle several SVG icons to a single SVG font
MIT License
45 stars 20 forks source link

Async error with readme example #61

Open timint opened 1 week ago

timint commented 1 week ago

Readme example is producing an error:

import { svgicons2svgfont } from 'gulp-svgicons2svgfont';

gulp.task('Iconfont', () => {
  svgicons2svgfont(['assets/icons/*.svg'], {
    fontName: 'myfont',
  })
    .on('glyphs', function (glyphs) {
      console.log(glyphs);
      // Here generate CSS/SCSS  for your glyphs ...
    })
    .pipe(gulp.dest('www/font/'));
});

The following tasks did not complete: build, fonticons Did you forget to signal async completion?

So I tried adding async:

gulp.task('Iconfont', async () => {

Finished 'Iconfont' after 12 ms

All good.

nfroidure commented 1 week ago

Thank for the report, feel free to PR a change.

timint commented 1 week ago

Sure, I can do that. 🙂