forked from nogizhopaboroda/f_context
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
46 lines (37 loc) · 954 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
45
46
pkg = require('./package.json');
gulp = require('gulp');
coffee = require('gulp-coffee');
util = require('gulp-util');
watch = require('gulp-watch');
karma = require("karma").server;
source = [
'src/f_context.coffee'
];
example_source = [
'example/example.coffee'
];
gulp.task('build', function() {
gulp.src(source)
.pipe(coffee().on('error', util.log))
.pipe(gulp.dest('dist'))
});
gulp.task('build_example', function() {
gulp.src(example_source)
.pipe(coffee().on('error', util.log))
.pipe(gulp.dest('example'))
});
gulp.task("watch", function() {
gulp.watch(source, ["build"]);
gulp.watch(example_source, ["build_example"]);
});
gulp.task("test", function(done) {
karma.start({
configFile: __dirname + '/karma.conf.js'
}, done);
});
gulp.task("bench", function(done) {
karma.start({
configFile: __dirname + '/karma.bench.conf.js'
}, done);
});
gulp.task('default', ['build', 'build_example', 'watch']);