forked from mgechev/angular-seed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.ts
107 lines (95 loc) · 2.6 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import * as gulp from 'gulp';
import {runSequence, task} from './tools/utils';
// --------------
// Clean (override).
gulp.task('clean', () => { task('clean', 'all' ); });
gulp.task('clean.dev', () => { task('clean', 'dev' ); });
gulp.task('clean.prod', () => { task('clean', 'prod' ); });
gulp.task('check.versions', () => { task('check.versions'); });
gulp.task('build.docs', () => { task('build.docs' ); });
gulp.task('serve.docs', () => { task('serve.docs' ); });
// --------------
// Build dev.
gulp.task('build.dev', done =>
runSequence('clean.dev',
'tslint',
'build.assets.dev',
'build.js.dev',
'build.index.dev',
done));
// --------------
// Build dev watch.
gulp.task('build.dev.watch', done =>
runSequence('build.dev',
'watch.dev',
done));
// --------------
// Build e2e.
gulp.task('build.e2e', done =>
runSequence('clean.dev',
'tslint',
'build.assets.dev',
'build.js.e2e',
'build.index.dev',
done));
// --------------
// Build prod.
gulp.task('build.prod', done =>
runSequence('clean.prod',
'tslint',
'build.assets.prod',
'build.html_css.prod',
'build.js.prod',
'build.bundles',
'build.bundles.app',
'build.index.prod',
done));
// --------------
// Build test.
gulp.task('build.test', done =>
runSequence('clean.dev',
'tslint',
'build.assets.dev',
'build.js.test',
'build.index.dev',
done));
// --------------
// Build test watch.
gulp.task('build.test.watch', done =>
runSequence('build.test',
'watch.test',
done));
// --------------
// Docs
// Disabled until https://github.com/sebastian-lenz/typedoc/issues/162 gets resolved
gulp.task('docs', done =>
runSequence('build.docs',
'serve.docs',
done));
// --------------
// Serve dev
gulp.task('serve.dev', done =>
runSequence('build.dev',
'server.start',
'watch.serve',
done));
// --------------
// Serve e2e
gulp.task('serve.e2e', done =>
runSequence('build.e2e',
'server.start',
'watch.serve',
done));
// --------------
// Serve prod
gulp.task('serve.prod', done =>
runSequence('build.prod',
'server.start',
'watch.serve',
done));
// --------------
// Test.
gulp.task('test', done =>
runSequence('build.test',
'karma.start',
done));