-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
44 lines (38 loc) · 988 Bytes
/
gulpfile.js
File metadata and controls
44 lines (38 loc) · 988 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
36
37
38
39
40
41
42
43
44
var gulp = require('gulp');
var Server = require('karma').Server;
var watch = require('gulp-watch');
var livereload = require('gulp-livereload');
var notify = require('gulp-notify');
gulp.task('html', function() {
gulp.src('app/')
.pipe(livereload())
.pipe(notify({ message : 'modified HTML'}));
});
gulp.task('js', function() {
gulp.src('app/')
.pipe(livereload())
.pipe(notify({ message : 'modified JS'}));
});
gulp.task('watch', function () {
livereload.listen();
gulp.watch('app/**/*.js', ['js']);
gulp.watch('app/**/*.html', ['html']);
});
/**
* Run test once and exit
*/
gulp.task('test', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, done).start();
});
/**
* Watch for file changes and re-run tests on each change
*/
gulp.task('tdd', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js'
}, done).start();
});
gulp.task('default', ['watch']);