forked from AngularShowcase/ng2-bootstrap-sbadmin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.ts
85 lines (73 loc) · 1.82 KB
/
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
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import * as gulp from 'gulp';
import * as runSequence from 'run-sequence';
import {ENV, PATH} from './tools/config';
import {
autoRegisterTasks,
registerInjectableAssetsRef,
task
} from './tools/utils';
// --------------
// Configuration.
autoRegisterTasks();
registerInjectableAssetsRef(PATH.src.jslib_inject, PATH.dest.dev.lib);
// registerInjectableAssetsRef(['ng2-bootstrap.js'], PATH.dest.dev.lib);
registerInjectableAssetsRef(PATH.src.csslib, PATH.dest.dev.css);
// --------------
// Clean (override).
gulp.task('clean', task('clean', 'all'));
gulp.task('clean.dist', task('clean', 'dist'));
gulp.task('clean.test', task('clean', 'test'));
// --------------
// Postinstall.
gulp.task('postinstall', done =>
runSequence('clean',
'npm',
done));
// --------------
// Build dev.
gulp.task('build.dev', done =>
runSequence('clean.dist',
'tslint',
'build.jslib.dev',
'build.ng2bs.dev',
'build.sass.dev',
'build.js.dev',
'build.csslib.dev',
'build.assets',
'build.fonts',
'build.index.dev',
'build.images.dev',
done));
gulp.task('build.dev.watch', done =>
runSequence('build.dev',
'watch.dev',
done));
gulp.task('build.test.watch', done =>
runSequence('build.test',
'watch.test',
done));
// --------------
// Test.
gulp.task('test', done =>
runSequence('clean.test',
'tslint',
'build.test',
'karma.start',
done));
// --------------
// Serve.
gulp.task('serve', done =>
runSequence(`build.${ENV}`,
'server.start',
'watch.serve',
done));
// --------------
// Docs
gulp.task('docs', done =>
runSequence('build.docs',
'serve.docs',
done));
// --------------
// Build prod.
// To be implemented (https://github.com/mgechev/angular2-seed/issues/58)
// Will start implementation when Angular 2 will get close to a stable release.