-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathgulpfile.js
57 lines (48 loc) · 1.19 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
var gulp = require('gulp');
var connect = require('gulp-connect');
var Builder = require('systemjs-builder');
var concat = require('gulp-concat');
var files = [
'jspm_packages/traceur-runtime.js',
'jspm_packages/system.js',
'jspm_packages/github/angular/[email protected]/zone.js',
'dist/build.js'
]
gulp.task('connect', function() {
connect.server({
livereload: true
});
});
gulp.task('index', function () {
gulp.src('index.html')
.pipe(connect.reload());
});
gulp.task('build',function(){
var builder = new Builder();
return builder.loadConfig('./config.js')
.then(function(){
builder.config({
annotations: true,
types: true,
memberVariables: true
})
return builder.build('app/main','dist/build.js');
})
});
gulp.task('ngBuild',function(){
var builder = new Builder();
return builder.loadConfig('./config.js')
.then(function(){
builder.config({
annotations: true,
types: true,
memberVariables: true
})
return builder.build('angular2/angular2','dist/angular2.js');
})
});
gulp.task('bundle', ['build'], function(){})
gulp.task('watch', function () {
gulp.watch(['./index.html','./src/**/*'], ['index']);
});
gulp.task('default', ['connect', 'watch']);