-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
44 lines (38 loc) · 952 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
43
44
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var connect = require('gulp-connect');
var karma = require('karma').server;
/**
* Run test once and exit
*/
gulp.task('test', function (done) {
karma.start({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, done);
});
gulp.task('serve', function () {
connect.server({
port: 1234
});
});
gulp.task('scripts', function() {
// Single entry point to browserify
gulp.src('src/main.js')
.pipe(browserify({
insertGlobals : true
}))
.pipe(gulp.dest('./dist/'))
});
gulp.task('scripts', function() {
// Single entry point to browserify
gulp.src('src/main.js')
.pipe(browserify({
insertGlobals : true
}))
.pipe(gulp.dest('./dist/'))
});
gulp.task('watch', function() {
return gulp.watch('src/**/*.js', ['scripts']);
});
gulp.task('default', ['serve', 'watch']);