-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
40 lines (33 loc) · 1.07 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
(function () {
var gulp = require('gulp'),
del = require('del'),
ngHtml2Js = require('gulp-ng-html2js'),
minifyHtml = require('gulp-minify-html'),
uglify = require('gulp-uglify'),
concat = require('gulp-concat');
gulp.task('clean', function () {
return del('build');
});
gulp.task('build:html', function () {
return gulp.src('src/**/*.html')
.pipe(minifyHtml({
empty: true,
spare: true,
quotes: true
}))
.pipe(ngHtml2Js({
moduleName: 'app',
rename: function (url) {
return url.replace('src/', '');
}
}))
.pipe(concat("templates-severstal.js"))
.pipe(uglify())
.pipe(gulp.dest('build/'));
});
gulp.task('watch', function () {
gulp.watch('src/**/*.*', gulp.series('build:html'));
});
gulp.task('build', gulp.series('build:html'));
gulp.task('default', gulp.series('build', 'watch'));
})();