forked from cloudscape-design/components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
48 lines (43 loc) · 1.31 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
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
// our package builds only on NodeJS 12 and above
require('please-upgrade-node')(require('./package.json'));
const { series, parallel, watch } = require('gulp');
const {
clean,
docs,
generateEnvironment,
generateIcons,
generateIndexFile,
generateCustomCssPropertiesMap,
packageJSON,
unit,
styles,
typescript,
buildPages,
testUtils,
a11y,
integ,
licenses,
themeableSource,
} = require('./build-tools/tasks');
const quickBuild = series(
clean,
parallel(packageJSON, generateEnvironment, generateIcons, generateIndexFile, licenses),
parallel(generateCustomCssPropertiesMap, styles, typescript, testUtils)
);
exports.clean = clean;
exports['quick-build'] = quickBuild;
exports.build = series(quickBuild, parallel(buildPages, themeableSource, docs));
exports.test = series(unit, integ, a11y);
exports['test:unit'] = unit;
exports['test:integ'] = integ;
exports['test:a11y'] = a11y;
exports.watch = () => {
watch(
['src/**/*.{ts,tsx}', '!src/test-utils/**/*.ts', '!**/__tests__/**', '!**/__integ__/**', '!**/__a11y__/**'],
typescript
);
watch(['src/test-utils/dom/**/*.ts', '!src/test-utils/dom/index.ts'], testUtils);
watch(['style-dictionary/**/*.ts', 'src/**/*.scss'], styles);
};