diff --git a/doc/api/cli.md b/doc/api/cli.md index 63e68244e75d7d..509b2cc252d635 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -2294,6 +2294,26 @@ The following environment variables are set when running a script with `--run`: * `NODE_RUN_PACKAGE_JSON_PATH`: The path to the `package.json` that is being processed. +### `--run-from=` + + + +> Stability: 1.0 - Early development + +Run a `package.json` script from a specified path to a `package.json` file +or path to the containing folder of a `package.json` file. + +The script is run from the current working directory, not from the +`package.json` containing folder. + +```bash +node --run-from=/app/package.json --run test +# Or +node --run-from=/app/ --run test +``` + ### `--secure-heap-min=n`