-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
26 lines (23 loc) · 904 Bytes
/
gulpfile.js
File metadata and controls
26 lines (23 loc) · 904 Bytes
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
var gulp = require('gulp');
var usemin = require('gulp-usemin');
var uglify = require('gulp-uglify');
var minifyCss = require('gulp-minify-css');
var gutil = require('gulp-util');
var bower = require('gulp-bower');
gulp.task('bower', function() {
return bower();
});
gulp.task('bootstrap-fonts', [ 'bower' ], function() {
gulp.src('src/static/bower_components/bootstrap/dist/fonts/**/*.{ttf,woff,eof,svg,woff2}')
.pipe(gulp.dest("dist/static/fonts"));
});
gulp.task('default', ['bower', 'bootstrap-fonts'], function() {
gulp.src('src/static/index.html')
.pipe(usemin({
assetsDir: 'src/static',
css: (gutil.env.NODE_ENV === 'production') ? [minifyCss(), 'concat'] : [ 'concat' ],
js: (gutil.env.NODE_ENV === 'production') ? [uglify(), 'concat'] : [ 'concat' ]
}))
.pipe(
gulp.dest("dist/static"));
});