Commit 5a3551d
authored
Support Node.js args to built-script executor (#92)
## Motivation for the change, related issues
When running Playground CLI and php-wasm CLI with the built-script
executor, I've wanted to add extra Node.js flags like
`--experimental-wasm-jspi`.
Prior to this PR, the only way was to hack the executor.ts file, but
these changes show up in `git status` and are easy to misplace and lose
when switching between branches and pushing and popping from the stash.
## Implementation details
This PR adds a `nodeArg` option to our custom `built-script` executor.
It is an array and can be specified multiple times to add multiple args.
## Testing Instructions (or ideally a Blueprint)
The built-script executor is only used by Playground CLI and php-wasm
CLI. Let's test both.
Run the following command:
```
npx nx start php-wasm-cli --nodeArg='--cpu-prof' --nodeArg='--trace-promises' -r 'phpinfo();'
```
- Confirm you see promise tracing in the output
- Confirm the command created a file ending in `.cpuprofile`
Run `npx nx start playground-cli server` to confirm it is still working.1 parent 9ff293b commit 5a3551d
File tree
3 files changed
+11
-1
lines changed- packages/nx-extensions/src/executors/built-script
3 files changed
+11
-1
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
12 | 20 | | |
13 | 21 | | |
14 | 22 | | |
| |||
0 commit comments