-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathgulpfile.js
More file actions
37 lines (29 loc) · 722 Bytes
/
gulpfile.js
File metadata and controls
37 lines (29 loc) · 722 Bytes
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
var gulp = require('gulp');
var p = require('gulp-load-plugins')();
var path = {
source : 'lib/*.js',
tests : 'test/*.js'
};
gulp.task('doc', function() {
return gulp.src(path.source)
.pipe(p.docco())
.pipe(gulp.dest('docs'));
});
gulp.task('package', function() {
return gulp.src('')
.pipe(p.exec('npm pack'));
});
gulp.task('test', function() {
return gulp.src(path.tests)
.pipe(p.mocha({ reporter : 'spec' }));
});
gulp.task('build', ['doc', 'test'], function() {
gulp.start('package');
});
gulp.task('clean', function() {
return gulp.src('docs')
.pipe(p.clean());
});
gulp.task('default', ['clean'], function() {
gulp.start('build');
});