feat: support for custom PKG_NODE_PATH (#7)
This commit is contained in:
parent
62ffff231b
commit
4bfcccb9af
15
README.md
15
README.md
@ -115,3 +115,18 @@ review.
|
||||
For example:
|
||||
|
||||
`yarn start --node-range node18 --arch x64 --output dist`
|
||||
|
||||
## Environment
|
||||
|
||||
| Var | Description |
|
||||
| ---------------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `PKG_BUILD_PATH` | Directory to use to clone and build nodejs binaries. Default to system temporary directory |
|
||||
| `PKG_CACHE_PATH` | Path to pkg-cache. Default to `~/.pkg-cache` |
|
||||
| `PKG_IGNORE_TAG` | Ignore tag folder when checking local binary path |
|
||||
| `PKG_NODE_PATH` | Custom path to the local nodejs binary to use |
|
||||
| `HTTPS_PROXY` | Optional HTTPS proxy to use when fetching binaries |
|
||||
| `HTTP_PROXY` | Optional HTTP proxy to use when fetching binaries |
|
||||
| `MAKE_JOB_COUNT` | Number of parallel jobs when building binaries (value passed to `make -j` option). Default to number of cpus |
|
||||
| `CFLAGS` | Flags to use when invoking C compiler |
|
||||
| `CXXFLAGS` | Flags to use when invoking C++ compiler |
|
||||
| `STRIP` | Path to `strip` command. Default to `strip` |
|
||||
|
||||
@ -37,6 +37,10 @@ export function localPlace({
|
||||
}: LocalPlaceOptions) {
|
||||
let binDir: string;
|
||||
|
||||
if(process.env.PKG_NODE_PATH) {
|
||||
return path.resolve(process.env.PKG_NODE_PATH);
|
||||
}
|
||||
|
||||
if (output) {
|
||||
binDir = path.resolve(output);
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user