-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
35 lines (29 loc) · 821 Bytes
/
gulpfile.js
File metadata and controls
35 lines (29 loc) · 821 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
33
34
35
var gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var ngAnnotate = require('gulp-ng-annotate');
var connect = require('gulp-connect');
gulp.task('build', function () {
gulp.src(['./json/*.json', ])
.pipe(concat('data.json'))
.pipe(uglify())
.pipe(gulp.dest('.'));
gulp.src(['./js/*.js',
'./app.js',
'./filter/*.js',
'./controller/*.js',
'./service/*.js'])
.pipe(concat('build.js'))
.pipe(uglify())
.pipe(gulp.dest('.'));
});
gulp.task('connect', function() {
connect.server({
root: '',
livereload: true
});
});
gulp.task('watch', function () {
gulp.watch('./*/*.js', ['build']);
});
gulp.task('default', ['connect', 'watch']);