Skip to content

Commit

Permalink
Stop esbuild service when testing
Browse files Browse the repository at this point in the history
  • Loading branch information
fwang committed Jan 12, 2021
1 parent b6dee7f commit 8d44665
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"packages": [
"packages/*"
],
"packages": ["packages/*"],
"npmClient": "yarn",
"useWorkspaces": true,
"version": "1.0.0-alpha.12"
Expand Down
6 changes: 6 additions & 0 deletions packages/cli/scripts/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,17 @@ async function startBuilder(cdkInputFiles) {
});
}
function stopBuilder() {
// Stop esbuild rebuild processes
Object.keys(builderState.entryPointsData).forEach((key) => {
if (builderState.entryPointsData[key].esbuilder !== null) {
builderState.entryPointsData[key].esbuilder.rebuild.dispose();
}
});

// Stop esbuild service
if (esbuildService) {
esbuildService.stop();
}
}
async function updateBuilder() {
builderLogger.silly(serializeState());
Expand Down

0 comments on commit 8d44665

Please sign in to comment.