forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable env vars in
node_build_script
(pantsbuild#19100)
## Context Many javascript and typescript build scripts use environment variables at build time. Adding this feature to pants would allow users to keep using this workflow as well as taking advantage of the cache system whenever specific environment variables change. ## Feature This PR adds `extra_env_vars` to `node_build_script` just like in other backends. You can either set a variable to a specific value or the variable name so pants will use the current environments' exported variable. ``` package_json( scripts=[ node_build_script( entry_point="build", extra_env_vars=["FOO=BAR", "ENVIRONMENT_VAR"] ) ] ) ``` Closes pantsbuild#19068
- Loading branch information
1 parent
2307d75
commit e536740
Showing
5 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters