forked from angular-directive/angular-lazyload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
43 lines (33 loc) · 832 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');
var browserSync = require('browser-sync').create();
var build = require('gulp-build');
gulp.paths = {
demo : 'demo'
}
gulp.task('browser-sync', function() {
browserSync.init({
server: {
baseDir : gulp.paths.demo,
index : 'index.html',
routes: {
"/bower_components": "bower_components",
}
},
startPath: '/',
files : gulp.paths.demo + '/*.*',
port : 3002
});
gulp.watch( gulp.paths.demo + "/*.*").on('change', browserSync.reload);
});
var options = {
helpers: [{
name: 'addition',
fn: function(a, b) { return a + b; }
}]
};
gulp.task('build' , function(){
gulp.src(gulp.paths.demo + "/*.js")
.pipe(build({ GA_ID: '123456' } , options))
.pipe(gulp.dest('dist'))
})
gulp.task('serve' , ['browser-sync']);