-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Is your feature request related to a problem?
The build-and-distribute workflow currently hardcodes npm build script, which always produces production-ready assets (minified, optimized, no source maps). When building from development branches, developers sometimes need development builds with source maps and/or non-minified assets for debugging purposes.
Describe the desired solution
We have already configured a script (build:dev) for development purposes in each repository, which creates a development build for the assets.
We can utilize it in the workflow by adding a new input NPM_BUILD_SCRIPT with a default value of build for backward compatibility. It is flexible enough for running whatever script is configured on each package (allowing each package to handle script-specific arguments internally without workflow changes), but it still remains compatible with most use cases.
On the Syde CLI, we can scaffold new packages with the workflow already configured to expose the input with two options: build and build:dev.
Describe the alternatives that you have considered
- Add an environment variable to declare the node environment: it should already work, but it needs to be documented, and maybe it's not straightforward to handle
- Add an additional input for the
MODE, which can be configured to have an impact on even composer dependencies. This needs to be investigated.
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct