-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgulpfile.js
33 lines (27 loc) · 813 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
var gulp = require('gulp'),
browserify = require('gulp-browserify'),
gulp_util = require('gulp-util'),
nodeunit = require('gulp-nodeunit-runner'),
debowerify = require('debowerify');
gulp.task('browserify', function () {
gulp.src(['lib/readthedocs.js'])
.pipe(browserify({
transform: ['debowerify']
}))
.on('error', function (event) {
gulp_util.log(event.message);
gulp_util.beep();
})
.pipe(gulp.dest('dist/'));
});
/* Tasks */
gulp.task('build', ['browserify']);
gulp.task('dev', ['build', 'watch']);
gulp.task('test', function () {
gulp.src(['tests/*.js'])
.pipe(nodeunit())
});
gulp.task('watch', function () {
gulp.watch('lib/*.js', ['build']);
});
gulp.task('default', ['test', 'build']);