forked from mgechev/angular-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.ts
26 lines (22 loc) · 787 Bytes
/
gulpfile.ts
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
import * as colors from 'ansi-colors';
import * as log from 'fancy-log';
import * as gulp from 'gulp';
import * as runSequence from 'run-sequence';
import Config from './tools/config';
import { loadCompositeTasks, loadTasks } from './tools/utils';
loadTasks(Config.SEED_TASKS_DIR);
loadTasks(Config.PROJECT_TASKS_DIR);
loadCompositeTasks(Config.SEED_COMPOSITE_TASKS, Config.PROJECT_COMPOSITE_TASKS);
// --------------
// Clean dev/coverage that will only run once
// this prevents karma watchers from being broken when directories are deleted
let firstRun = true;
gulp.task('clean.once', (done: any) => {
if (firstRun) {
firstRun = false;
runSequence('check.tools', 'clean.dev', 'clean.coverage', done);
} else {
log('Skipping clean on rebuild');
done();
}
});