Skip to content

Commit 30f5ef7

Browse files
chenbin92ClarkXia
chenbin92
andauthored
feat: pass parameters to run hook (#7)
* feat: pass parameters to run hook * chore: version Co-authored-by: ClarkXia <xiawenwu41@gmail.com>
1 parent a192091 commit 30f5ef7

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

packages/build-scripts/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.1.29
4+
5+
- [feat] add hook params
6+
37
## 0.1.28
48

59
- [feat] bump jest version

packages/build-scripts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alib/build-scripts",
3-
"version": "0.1.28",
3+
"version": "0.1.29",
44
"license": "MIT",
55
"description": "scripts core",
66
"main": "lib/index.js",

packages/build-scripts/src/commands/build.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ export = async function({
7070
}
7171
});
7272

73-
await applyHook(`before.${command}.run`);
74-
7573
const webpackConfig = configArr.map(v => v.chainConfig.toConfig());
74+
await applyHook(`before.${command}.run`, { args, config: webpackConfig });
7675

7776
let compiler: webpack.MultiCompiler;
7877
try {

packages/build-scripts/src/commands/start.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ export = async function({
7676
}
7777
}
7878

79-
await applyHook(`before.${command}.run`);
8079
const webpackConfig = configArr.map(v => v.chainConfig.toConfig());
80+
await applyHook(`before.${command}.run`, { args, config: webpackConfig });
8181

8282
let compiler;
8383
try {

0 commit comments

Comments
 (0)