-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
33 lines (27 loc) · 908 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
32
33
var browserify = require('gulp-browserify'),
gulp = require('gulp'),
minifier = require('gulp-minifier'),
ngAnnotate = require('gulp-ng-annotate'),
rename = require('gulp-rename');
gulp.task('dist/angular-nadobit-api.js', function() {
return gulp.src('src/angular-nadobit-api.js')
.pipe(browserify({debug: true}))
.pipe(ngAnnotate())
.pipe(gulp.dest('dist'));
});
gulp.task('dist/angular-nadobit-api.min.js', gulp.series(
'dist/angular-nadobit-api.js',
function() {
return gulp.src('dist/angular-nadobit-api.js')
.pipe(minifier({
minify: true,
minifyJS: true,
collapseWhitespace: true,
}))
.pipe(rename('angular-nadobit-api.min.js'))
.pipe(gulp.dest('dist'));
}
));
gulp.task('build', gulp.parallel(
'dist/angular-nadobit-api.min.js'
));