-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
38 lines (30 loc) · 889 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
var gulp = require('gulp');
var gutil = require('gulp-util');
var coffee = require('gulp-coffee');
var concat = require('gulp-concat');
var runSequence = require('run-sequence');
var libraryName = "brow-route.coffee";
var sources = {
coffee: "lib/**/*.coffee",
tests: "test/**/*.coffee"
};
var destinations = {
js: "dist/"
};
gulp.task('default', ['watch']);
gulp.task('build', function() {
gulp.src(sources.coffee)
.pipe(concat(libraryName))
.pipe(coffee({bare: false}).on('error', gutil.log))
.pipe(gulp.dest(destinations.js));
});
gulp.task('build-test', function() {
gulp.src(sources.tests)
.pipe(coffee({bare: true}).on('error', gutil.log))
.pipe(gulp.dest(destinations.js));
})
gulp.task('watch', ['build', 'build-test', 'justWatch']);
gulp.task('justWatch', function() {
gulp.watch(sources.coffee, ['build']);
gulp.watch(sources.tests, ['build-test']);
});