-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
41 lines (37 loc) · 1007 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
34
35
36
37
38
39
40
41
var gulp = require('gulp'),
browserSync = require('browser-sync'),
del = require('del'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify');
var reload = browserSync.reload;
gulp.task('b', function() {
gulp.src('./src/app/angular-echarts3.js')
.pipe(gulp.dest('./dist'))
.pipe(rename({ suffix: '.min' }))
.pipe(uglify({
mangle: {
except: ['$window']
}
}))
.pipe(gulp.dest('./dist'));
});
gulp.task('c', function() {
del('./dist/*');
});
gulp.task('s', function() {
browserSync.init({
server: {
baseDir: "./src",
routes: {
"/echarts": "bower_components/echarts",
"/angular": "bower_components/angular/angular.min.js",
}
},
files: ["./src/**/*.html", "./src/**/*.js"],
ghostMode: {
clicks: false,
forms: false,
scroll: false
}
});
});