-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
51 lines (44 loc) · 1.31 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* Welcome to your gulpfile!
* The gulp tasks are split into several files in the gulp directory
* because putting it all here was too long
*/
'use strict';
var gulp = require('gulp');
var wrench = require('wrench');
var plugins = require('gulp-load-plugins')();
/**
* This will load all js or coffee files in the gulp directory
* in order to load all gulp tasks
*/
wrench.readdirSyncRecursive('./gulp').filter(function(file) {
return (/\.(js|coffee)$/i).test(file);
}).map(function(file) {
require('./gulp/' + file);
});
var paths = {
iconDest: 'src/assets/fonts/',
iconSrc: 'src/assets/images/svg/icons/*.svg',
iconTemplateDir: 'src/app/sass/templates/'
};
// Task that converts svg assets into icon fonts
var fontName = 'mkrb-ui';
gulp.task('iconfonts', function(){
gulp.src([paths.iconSrc])
.pipe(plugins.iconfontCss({
fontName: fontName,
targetPath: '../../app/sass/templates/_icons.scss',
fontPath: '/assets/fonts/'
}))
.pipe(plugins.iconfont({
fontName: fontName
}))
.pipe(gulp.dest(paths.iconDest));
});
/**
* Default task clean temporaries directories and launch the
* main optimization build task
*/
gulp.task('default', ['clean'], function () {
gulp.start('build');
});