forked from sparkdesignsystem/spark-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
executable file
·106 lines (96 loc) · 2.94 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
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
const gulp = require('gulp');
const runSequence = require('run-sequence');
require('./gulp/spark-core/spark-core.gulpfile.js');
require('./gulp/spark-extras/spark-card.gulpfile.js');
require('./gulp/spark-extras/spark-dictionary.gulpfile.js');
require('./gulp/spark-extras/spark-highlight-board.gulpfile.js');
require('./gulp/drizzle/drizzle.gulpfile.js');
require('./gulp/angular/dev-app/angulardevapp.gulpfile.js');
require('./gulp/angular/spark-core-angular/spark-core-angular.gulpfile.js');
require('./gulp/angular/spark-extras-angular-award/spark-extras-angular-award.gulpfile.js');
require('./gulp/angular/spark-extras-angular-card/spark-extras-angular-card.gulpfile.js');
require('./gulp/angular/spark-extras-angular-dictionary/spark-extras-angular-dictionary.gulpfile.js');
require('./gulp/angular/spark-extras-angular-highlight-board/spark-extras-angular-highlight-board.gulpfile.js');
gulp.task('pre-publish', (cb) => {
runSequence(
'setup-spark-packages',
'build-drizzle',
'install-angular-dev-app',
'setup-spark-angular-projects',
cb,
);
});
gulp.task('setup-spark-packages', (cb) => {
runSequence(
'setup-spark-core',
'setup-spark-card',
'setup-spark-dictionary',
'setup-spark-highlight-board',
cb,
);
});
// assumes that setup-spark-packages has been run
gulp.task('setup-spark-angular-projects', (cb) => {
runSequence(
'setup-spark-core-angular',
[
'setup-spark-extras-angular-award',
'setup-spark-extras-angular-card',
'setup-spark-extras-angular-dictionary',
'setup-spark-extras-angular-highlight-board',
],
cb,
);
});
gulp.task('clean-all', (cb) => {
runSequence(
[
'clean',
'clean-spark-core',
'clean-spark-highlight-board',
'clean-angular-dev-app',
'clean-spark-core-angular',
'clean-spark-extras-angular-award',
'clean-spark-extras-angular-card',
'clean-spark-extras-angular-dictionary',
'clean-spark-extras-angular-highlight-board',
],
cb,
);
});
gulp.task('dev-spark-packages', (cb) => {
runSequence('setup-spark-packages', 'build-drizzle', ['watch', 'serve'], cb);
});
gulp.task('dev-spark-angular', (cb) => {
runSequence(
'install-angular-dev-app',
'setup-spark-packages',
'setup-spark-angular-projects',
['serve-angular-dev-app', 'watch'],
cb,
);
});
gulp.task('dev-all', (cb) => {
runSequence(
'setup-spark-packages',
'install-angular-dev-app',
'setup-spark-angular-projects',
'build-drizzle',
['serve-angular-dev-app', 'serve', 'watch'],
cb,
);
});
gulp.task('test-angular', (cb) => {
runSequence(
'test-spark-core-angular',
'test-spark-extras-angular-award',
'test-spark-extras-angular-card',
'test-spark-extras-angular-dictionary',
'test-spark-extras-angular-highlight-board',
cb,
);
});
// netlify
gulp.task('build', (cb) => {
runSequence('pre-publish', 'build-angular-dev-app-netlify', 'transfer-angular-dev-app', cb);
});