-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
30 lines (26 loc) · 877 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
var gulp = require('gulp'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish-ex'),
cp = require('child_process'),
pkg = require('./package.json');
// Lint
gulp.task('lint', function() {
return gulp.src(['./src/**/*.js', '!./src/lib/**/*.js'])
.pipe(jshint('.jshintrc'))
.pipe(jshint.reporter(stylish))
.pipe(jshint.reporter('fail'));
});
// Build
gulp.task('build-dev', function(callback) {
cp.exec('r.js.cmd -o build.dev.js', callback);
});
gulp.task('build-prod', function(callback) {
cp.exec('r.js.cmd -o build.prod.js out=zeldus.min.js', callback);
});
// doxx documentation
gulp.task('documentation', function(callback){
cp.exec('doxx --title "Zeldus" --ignore lib --source src --target docs', callback);
});
gulp.task('test', ['lint']);
gulp.task('docs', ['documentation']);
gulp.task('default', ['build-dev', 'build-prod']);