-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgulpfile.js
More file actions
32 lines (27 loc) · 831 Bytes
/
gulpfile.js
File metadata and controls
32 lines (27 loc) · 831 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
27
28
29
30
31
32
var gulp = require('gulp'),
concat = require('gulp-concat'),
jsmin = require('gulp-jsmin'),
uglify = require('gulp-uglify'),
embedTemplates = require('gulp-angular-embed-templates');
gulp.task('min', function () {
gulp.src(['dev/autocomplete.js'])
.pipe(jsmin())
.pipe(uglify())
.pipe(concat('autocomplete.min.js'))
.pipe(embedTemplates())
.pipe(gulp.dest('dest'));
});
gulp.task('build', function () {
gulp.src(['dev/autocomplete.js'])
.pipe(concat('autocomplete.js'))
.pipe(embedTemplates())
.pipe(gulp.dest('dest'));
});
gulp.task('copy', function () {
gulp.src('./dest/autocomplete.min.js')
.pipe(gulp.dest('demo'));
});
gulp.task('watch', function(){
gulp.watch('dev/*', ['default']);
});
gulp.task('default', ['build', 'min', 'copy']);