-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.js
41 lines (35 loc) · 869 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 connect = require('gulp-connect');
var rename = require("gulp-rename");
var del = require('del');
var shell = require('gulp-shell');
var karma = require('karma').server;
gulp.task('serve', function() {
connect.server({
livereload: true,
port:8000
});
});
gulp.task('build',function(){
del(['./build/**/*']);
gulp.src('./index_prod.html')
.pipe(rename("index.html"))
.pipe(shell(['jspm bundle-sfx src/main build/app.js']))
.pipe(gulp.dest('./build'));
});
gulp.task('serve-build',['build'],function(){
connect.server({
root:'build',
port:8001
});
});
gulp.task('test', function(done) {
karma.start({
configFile: __dirname + '/karma.conf.js'
}, function() {
done();
});
});
gulp.task('default', ['test'],function () {
return gulp.watch(['*.js','tests/*.js'], ['test']);
});