You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
does node run postbuild command when running npm build?
ChatGPT
No, npm build does not automatically run a postbuild script. The postbuild script is only triggered if you define it in your package.json, and it will run after the build script has completed successfully.
Here's how it works:
You define a build script in your package.json:
{
"scripts": {
"build": "some-build-command"
}
}
If you also define a postbuild script, it will be run automatically after npm run build completes:
When you run npm run build, Node will execute the build script first, and if it succeeds, it will automatically execute the postbuild script right afterward.
This is a general feature of npm scripts, where pre and post scripts (e.g., prebuild, postbuild) run automatically before and after the corresponding main script (build in this case).
The text was updated successfully, but these errors were encountered:
Current Behavior
Build and postbuild in https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/blob/main/.github/workflows/sveltekitci.yml run JamPack twice (see also https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/blob/main/package.json)
Remove extra postbuild step from https://github.com/Stadt-Geschichte-Basel/stadtgeschichtebasel.ch/blob/main/.github/workflows/sveltekitci.yml
Reproduction / Steps To Reproduce
build
andpostbuild
Anything else?
does node run postbuild command when running npm build?
ChatGPT
The text was updated successfully, but these errors were encountered: