-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
42 lines (34 loc) · 851 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
42
// Include gulp
var gulp = require('gulp');
var karma = require('karma');
// Include Our Plugins
var jshint = require('gulp-jshint');
var rename = require('gulp-rename');
// Lint Task
gulp.task('lint', function() {
return gulp.src('src/**/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'));
});
// Concatenate & Minify JS
gulp.task('scripts', function() {
return gulp.src('src/**/*.js')
.pipe(gulp.dest('dist'))
});
//test
gulp.task('test', function (done) {
new karma.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 karma.Server({
configFile: __dirname + '/karma.conf.js'
}, done).start();
});
// Default Task
gulp.task('default', ['lint', 'scripts']);