-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
executable file
·55 lines (42 loc) · 1.63 KB
/
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
47
48
49
50
51
52
53
54
55
'use strict';
var gulp = require('gulp');
var requireDir = require('require-dir');
var config = require('./tasks/config');
var console = require('./index');
var utils = require('./tasks/utils/cd-utils');
// LOAD ALL TASKS
// *** you can execute task like `gulp <taskName>` ***
// =============================================================================
console.note('Loading Tasks and Watchers...');
requireDir('./tasks', {recurse: false});
// DEFINE TASKS
// =============================================================================
gulp.task('build', ['lint','test:mocha','todo'], function (){});
gulp.task('tdd', function (){
gulp.watch(config.test.src, ['test:mocha']);
});
// WATCHERS
// =============================================================================
// if this gets too big, we will offload to its own task at that point
// script edits and lint them
gulp.task('watch', function (){
gulp.watch(config.lint.src, ['lint']);
gulp.watch(config.test.src, ['test:mocha']);
gulp.watch(config.todo.src, ['todo']);
});
gulp.task('watch:test', ['test:mocha'], function (){
gulp.watch(config.test.src, ['test:mocha']);
});
gulp.task('watch:scripts', function (){
gulp.watch(config.lint.src, ['lint']);
gulp.watch(config.todo.src, ['todo']);
});
// DEFAULT
// =============================================================================
// this will be executed when `gulp` is executed from command line.
// See `gulp build` for task to run all tasks
gulp.task('default', function (){
gulp.watch(config.lint.src, ['lint']);
gulp.watch(config.test.src, ['test']);
gulp.watch(config.todo.src, ['todo']);
});