Skip to content

Commit

Permalink
Updated Gulp snippet on post
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Cousin committed Nov 5, 2014
1 parent cb1d1e9 commit 601d88e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions _posts/2014-11-03-building-an-iconfont-from-sketch-to-gulp.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ __Before you launch the task : get your Sketchfile ready by flattening your icon

### Script

gulp.task('webfont', function(){
gulp.task('icons', function(){

return gulp.src('sketch/icons.sketch')
return gulp.src('src/sketch/icons.sketch')
.pipe(sketch({
export: 'slices',
formats: 'svg',
compact: 'yes',
saveForWeb: 'yes'
}))
.pipe(gulp.dest('svg/'))
.pipe(gulp.dest('dist/svg/'))
.pipe(iconfont({
fontName: 'icons',
appendCodepoints: false,
Expand All @@ -74,28 +74,28 @@ __Before you launch the task : get your Sketchfile ready by flattening your icon
fontHeight: 100 // IMPORTANT
}))
.on('codepoints', function(codepoints, options) {
gulp.src('templates/icon-template.css')
gulp.src('src/templates/icon-template.css')
.pipe(consolidate('lodash', {
glyphs: codepoints,
fontName: 'WisemblyIconfont',
fontPath: '/font/',
fontPath: '/dist/font/',
className: 'icon',
}))
.pipe(rename('icons.css'))
.pipe(gulp.dest('css/'));
.pipe(gulp.dest('dist/css/'));
})
.on('codepoints', function(codepoints, options) {
gulp.src('templates/icon-template-ie.css')
gulp.src('src/templates/icon-template-ie.css')
.pipe(consolidate('lodash', {
glyphs: codepoints,
fontName: 'Wisembly Iconfont',
fontPath: '/font/',
fontName: 'WisemblyIconfont',
fontPath: '/dist/font/',
className: 'icon',
}))
.pipe(rename('icons-ie.css'))
.pipe(gulp.dest('css/'));
.pipe(gulp.dest('dist/css/'));
})
.pipe(gulp.dest('font/'));
.pipe(gulp.dest('dist/font/'));
});

### Bonus
Expand Down

0 comments on commit 601d88e

Please sign in to comment.