-
Notifications
You must be signed in to change notification settings - Fork 7
/
gulpfile.js
46 lines (40 loc) · 1.29 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
const { parallel } = require('gulp');
const templates = require('./conf/gulp-tasks/templates.gulpfile.js');
const library = require('./conf/gulp-tasks/library.gulpfile.js');
const extractTranslations = require('./conf/gulp-tasks/extracttranslations.gulpfile.js');
const languageEnv = process.env.LANGUAGE;
let languages;
if (languageEnv && typeof languageEnv === 'string') {
languages = languageEnv.split(',');
}
const cloudRegionEnv = process.env.CLOUD_REGION;
let cloudRegion;
if (cloudRegionEnv && typeof cloudRegionEnv === 'string') {
cloudRegion = cloudRegionEnv;
}
exports.default = exports.build = parallel(
templates.default,
library.default
);
exports.dev = parallel(
templates.dev,
library.dev
);
exports.unminifiedLegacy = parallel(
templates.unminifiedLegacy,
library.unminifiedLegacy
);
exports.buildLanguages = parallel(
templates.buildLanguages,
library.buildLanguages
);
exports.buildLocales = parallel(
library.buildLocales.bind(null, languages, cloudRegion),
templates.buildLocales.bind(null, languages)
);
exports.extractTranslations = extractTranslations;
exports.templates = templates.default;
exports.buildSearchBarOnlyAssets = parallel(
library.buildSearchBarOnlyAssets.bind(null, languages, cloudRegion),
templates.buildSearchBarOnlyAssets.bind(null, languages)
);