-
Notifications
You must be signed in to change notification settings - Fork 159
/
gulpfile.js
61 lines (57 loc) · 1.55 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
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const { series, parallel, watch } = require('gulp');
const {
clean,
docs,
generateEnvironment,
generateIcons,
generateIndexFile,
generateCustomCssPropertiesMap,
packageJSON,
unit,
styles,
typescript,
buildPages,
testUtils,
a11y,
generateI18nMessages,
integ,
motion,
licenses,
themeableSource,
bundleVendorFiles,
sizeLimit,
} = require('./build-tools/tasks');
const quickBuild = series(
clean,
parallel(packageJSON, generateI18nMessages, generateEnvironment, generateIcons, generateIndexFile, licenses),
parallel(generateCustomCssPropertiesMap, styles, typescript, testUtils),
bundleVendorFiles
);
exports.clean = clean;
exports['quick-build'] = quickBuild;
exports.i18n = generateI18nMessages;
exports.build = series(quickBuild, parallel(buildPages, themeableSource, docs, sizeLimit));
exports.test = series(unit, integ, a11y);
exports['test:unit'] = unit;
exports['test:integ'] = integ;
exports['test:a11y'] = a11y;
exports['test:motion'] = motion;
exports.watch = () => {
watch(
[
'src/**/*.{ts,tsx}',
'!src/test-utils/**/*.ts',
'!**/__tests__/**',
'!**/__integ__/**',
'!**/__a11y__/**',
'!**/__motion__/**',
'!src/internal/vendor/**/*.ts',
],
typescript
);
watch(['src/i18n/messages/*.json'], generateI18nMessages);
watch(['src/test-utils/dom/**/*.ts', '!src/test-utils/dom/index.ts'], testUtils);
watch(['style-dictionary/**/*.ts', 'src/**/*.scss'], styles);
};