Skip to content

Commit

Permalink
feat: pass parameters to run hook (#7)
Browse files Browse the repository at this point in the history
* feat: pass parameters to run hook

* chore: version

Co-authored-by: ClarkXia <[email protected]>
  • Loading branch information
chenbin92 and ClarkXia authored Sep 15, 2020
1 parent a192091 commit 30f5ef7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions packages/build-scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.1.29

- [feat] add hook params

## 0.1.28

- [feat] bump jest version
Expand Down
2 changes: 1 addition & 1 deletion packages/build-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alib/build-scripts",
"version": "0.1.28",
"version": "0.1.29",
"license": "MIT",
"description": "scripts core",
"main": "lib/index.js",
Expand Down
3 changes: 1 addition & 2 deletions packages/build-scripts/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,8 @@ export = async function({
}
});

await applyHook(`before.${command}.run`);

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

let compiler: webpack.MultiCompiler;
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/build-scripts/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ export = async function({
}
}

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

let compiler;
try {
Expand Down

0 comments on commit 30f5ef7

Please sign in to comment.