Skip to content

Instantly share code, notes, and snippets.

@lmartins
Created June 28, 2014 09:56
Show Gist options
  • Select an option

  • Save lmartins/f9f2f130ae03d511e674 to your computer and use it in GitHub Desktop.

Select an option

Save lmartins/f9f2f130ae03d511e674 to your computer and use it in GitHub Desktop.
Issues with icon font generation
'use strict';
var gulp = require('gulp'),
iconfont = require('gulp-iconfont'),
iconfontCss = require('gulp-iconfont-css');
var config = {
ICONS: {
src : 'sass/app/components/icons/svg/*.svg',
build : 'build/assets/css/fonts/',
fontname : 'icon'
}
}
// ICONS ----------------------------------------------------------------------
gulp.task('icons', function(){
gulp.src( 'sass/app/components/icons/svg/*.svg' )
.pipe( iconfontCss({
fontName: 'icons',
path: './sass/app/components/icons/_icons-template.scss',
targetPath: '../../../.src/sass/app/components/icons/_icons.scss',
fontPath: './fonts/',
}))
.pipe( iconfont ({
fontName: 'icons',
fixedWidth: true,
appendCodepoints: false
}))
.pipe(gulp.dest( 'build/assets/css/fonts/' ));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment