forked from DevExpress/DevExtreme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
71 lines (59 loc) · 1.89 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
/* eslint-env node */
/* eslint-disable no-console */
const gulp = require('gulp');
const multiProcess = require('gulp-multi-process');
gulp.task('clean', function(callback) {
require('del').sync('artifacts');
callback();
});
require('./build/gulp/bundler-config');
require('./build/gulp/transpile');
require('./build/gulp/js-bundles');
require('./build/gulp/vectormap');
require('./build/gulp/npm');
require('./build/gulp/themebuilder-npm');
require('./build/gulp/aspnet');
require('./build/gulp/vendor');
require('./build/gulp/ts');
require('./build/gulp/localization');
require('./build/gulp/style-compiler');
const QUNIT_CI = Boolean(process.env['DEVEXTREME_QUNIT_CI']);
const DOCKER_CI = Boolean(process.env['DEVEXTREME_DOCKER_CI']);
if(QUNIT_CI) {
console.warn("Using QUnit CI mode!");
}
function createStyleCompilerBatch() {
const tasks = ['style-compiler-themes'];
if(!QUNIT_CI) {
tasks.push('style-compiler-tb-assets');
}
return gulp.series(tasks);
}
function createMiscBatch() {
const tasks = ['vectormap', 'vendor'];
if(!QUNIT_CI) {
tasks.push('aspnet', 'ts');
}
return gulp.parallel(tasks);
}
function createMainBatch() {
const tasks = ['js-bundles-debug'];
if(!QUNIT_CI) {
tasks.push('js-bundles-prod');
}
tasks.push('style-compiler-batch', 'misc-batch');
return DOCKER_CI
? gulp.parallel(tasks)
: (callback) => multiProcess(tasks, callback, true);
}
function createDefaultBatch() {
const tasks = [ 'clean', 'localization', createMainBatch() ];
if(!QUNIT_CI) {
tasks.push('npm', 'themebuilder-npm');
}
return gulp.series(tasks);
}
gulp.task('misc-batch', createMiscBatch());
gulp.task('style-compiler-batch', createStyleCompilerBatch());
gulp.task('default', createDefaultBatch());
gulp.task('dev', gulp.parallel('bundler-config-dev', 'js-bundles-dev', 'style-compiler-themes-dev'));