Skip to content

Commit 4c04c27

Browse files
committed
perf(omni build): gulp-package custom configuration expose full items
1 parent 27aa323 commit 4c04c27

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
English | [简体中文](./CHANGELOG.zh-CN.md)
44

55
## v2.5.x
6+
### v2.5.5
7+
1. 「optimization」 `omni build` gulp-package custom configuration expose full items
8+
69
### v2.5.4
710
1. 「optimization」 `omni build` gulp-package support custom configuration
811

docs/CHANGELOG.zh-CN.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
[English](./CHANGELOG.md) | 简体中文
44

55
## v2.5.x
6+
### v2.5.5
7+
1. 「optimization」 `omni build` gulp 打包自定义暴露完整配置项
8+
69
### v2.5.4
710
1. 「optimization」 `omni build` gulp 打包支持自定义配置
811

src/commands/build/gulp.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const configs = requireCwd(configFilePath);
3535
${configurationPath ? `const customConfig = require('${configurationPath}')
3636
` : ''}
3737
const { build } = configs || {};
38-
const { configuration = ({ task }) => task } = build || {};
38+
const { configuration = ({ task }) => { const [compileCJS, compileES, compileSFC, ...rest] = task; return [gulp.series(compileCJS, compileES, compileSFC), ...rest]; } } = build || {};
3939
const project = typescript && typescript.createProject('tsconfig.json');
4040
4141
const params = {
@@ -161,12 +161,10 @@ function trans2css() {
161161
.pipe(gulp.dest(dest.es));
162162
}
163163
164-
const buildScripts = gulp.series(compileCJS, compileES, compileSFC);
165-
166164
const builds = ${
167165
configurationPath
168166
? 'customConfig'
169-
: 'gulp.parallel.apply(gulp, configuration({ task: [buildScripts, copyStylesheet, trans2css], params }));'
167+
: 'gulp.parallel.apply(gulp, configuration({ task: [compileCJS, compileES, compileSFC, copyStylesheet, trans2css], params }));'
170168
}
171169
172170
exports.build = builds;

0 commit comments

Comments
 (0)