You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ CLI ] Rename CLI binaries in @php-wasm/cli and @wp-playground/cli (#2441)
## Motivation for the change, related issues
Currently, when NPM installs `@php-wasm/cli`, it creates a binary named
`cli` in the `node_modules/.bin`. However, if there is an already
existing `cli` binary in the `node_modules/.bin` directory, the action
is ignored.
That is what is happening when trying to install both `@php-wasm/cli`
and `@wp-playground/cli` in the same project.
This pull request aims to rename these generic binaries into :
- `cli` > `php-wasm-cli`
- `cli` > `wp-playground-cli`
## Implementation details
`@php-wasm/cli/package.json`
```diff
- "bin": "php-wasm.js"
+ "bin": {
+ "php-wasm-cli": "php-wasm.js"
+ },
```
`@wp-playground-cli/package.json`
```diff
- "bin": "wp-playground.js"
+ "bin": {
+ "wp-playground-cli": "wp-playground.js"
+ },
```
## Testing Instructions (or ideally a Blueprint)
Run `npm install` in a empty directory :
```
npm install @php-wasm/cli @wp-playground/cli
```
### Before
```
> ls -1A node_modules/.bin
cli
crc32
mime
semver
sha.js
xdebug-bridge
```
### After
```
> ls -1A node_modules/.bin
crc32
mime
php-wasm-cli
semver
sha.js
wp-playground-cli
xdebug-bridge
```
0 commit comments