Skip to content

Commit fea9e99

Browse files
Support quickly testing php-wasm CLI changes with bun (#85)
## Motivation for the change, related issues Testing Playground CLI with bun (via `npx nx dev playground-cli`) is much faster than building and running via node (via `npx nx start playground-cli`). This PR adds the option to run `@php-wasm/cli` the same way. ## Implementation details This PR adds a `dev` target to the php-wasm-cli project. The `dev` target runs `@php-wasm/cli` using `bun --watch`. ## Testing Instructions (or ideally a Blueprint) - CI - Manually try the new target with `npx nx dev php-wasm-cli "-r 'echo \"huzzah\n\";'"` - Note: For some reason, extra args need to be quoted because they are not escaped when forwarded, at least with our current version of nx and nx:run-commands.
1 parent f003f02 commit fea9e99

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/php-wasm/cli/project.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@
2929
}
3030
}
3131
},
32+
"dev": {
33+
"executor": "nx:run-commands",
34+
"options": {
35+
"command": "bun --watch ./packages/php-wasm/cli/src/main.ts",
36+
"tty": true
37+
}
38+
},
3239
"start": {
3340
"executor": "@wp-playground/nx-extensions:built-script",
3441
"options": {

0 commit comments

Comments
 (0)