forked from jesseweed/seti-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
31 lines (28 loc) · 837 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
var fontName = 'seti',
gulp = require('gulp'),
iconfont = require('gulp-iconfont'),
iconfontCss = require('gulp-iconfont-css'),
svgmin = require('gulp-svgmin');
gulp.task('font', function(){
gulp.src(['./icons/*.svg'])
.pipe(iconfontCss({
fontName: fontName,
path: './styles/_fonts/_template.less',
targetPath: '../seti.less/',
fontPath: './styles/_fonts/seti/'
}))
.pipe(iconfont({
normalize: true,
fontHeight: 1000,
fontName: fontName,
formats: ['ttf', 'eot', 'woff', 'woff2', 'svg']
}))
.pipe(gulp.dest('./styles/_fonts/seti/'));
});
gulp.task('icon', ['svg', 'font']);
gulp.task('icons', ['svg', 'font']);
gulp.task('svg', function() {
gulp.src('./icons/*.svg')
.pipe(svgmin())
.pipe(gulp.dest('./icons'));
});