-
Notifications
You must be signed in to change notification settings - Fork 325
Expand file tree
/
Copy pathgulpfile.dist.js
More file actions
36 lines (30 loc) · 970 Bytes
/
gulpfile.dist.js
File metadata and controls
36 lines (30 loc) · 970 Bytes
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
const gulp = require('gulp');
const base = require('./gulpfile.base');
/* config */
const componentsPath = 'packages/components';
const proComponentsPath = 'packages/pro-components/chat';
const dist = 'packages/tdesign-miniprogram/miniprogram_dist';
/* base tasks */
const componentsTasks = base(componentsPath, dist, 'dist');
const proComponentsTasks = base(proComponentsPath, dist, 'dist');
const { build: buildAssets } = base(componentsPath, 'tdesign-miniprogram', 'assets');
/** `gulp clear`
* 清理文件
* */
const clear = gulp.parallel(componentsTasks.clear, proComponentsTasks.clear);
/** `gulp build`
* 构建
* */
const build = gulp.parallel(componentsTasks.build, proComponentsTasks.build);
/** `gulp watch`
* 监听
* */
const watch = gulp.parallel(componentsTasks.watch, proComponentsTasks.watch);
// `gulp --tasks --gulpfile script/gulpfile.dist.js` list tasks
module.exports = {
clear,
build,
buildAssets,
watch,
default: build,
};