Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions packages/playground/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- [Quickstart](#quickstart)
- [Usage](#usage)
- [Working with Blueprints](#working-with-blueprints)
- [How can I contribute?](#how-can-i-contribute)
- [Contributing](#contributing)

## Requirements

Expand Down Expand Up @@ -175,7 +175,39 @@ cliServer = await runCLI({
- Is faster to start up for quick tests and development.
- The Playground doesn't come with a MySQL Server, but you can provide your own MySQL credentials.

## How can I contribute?
## Contributing

### Running Playground CLI from source

To set it up:

```bash
# If you don't have the repository cloned yet:
git clone -b trunk --single-branch --depth 1 --recurse-submodules https://github.com/WordPress/wordpress-playground.git
cd wordpress-playground

# Alternatively, if you already have a clone but forgot to
# pull the submodules, you can run:
cd wordpress-playground
git submodule update --init --recursive

nvm use 23
npm install
```

To run it:

```bash
node --experimental-strip-types --experimental-transform-types --import ./packages/meta/src/node-es-module-loader/register.mts ./packages/playground/cli/src/cli.ts
```

Or this instead of the above:

```bash
nx dev playground-cli server
```

### How can I contribute?

WordPress Playground CLI is an open-source project and welcomes all contributors from documentation to triage. If the feature you need is missing, you are more than welcome to start a discussion, open an issue, and even propose a Pull Request to implement it.

Expand Down
4 changes: 2 additions & 2 deletions packages/playground/cli/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"dev": {
"executor": "nx:run-commands",
"options": {
"command": "node --no-warnings --experimental-wasm-stack-switching --experimental-wasm-jspi --loader=./packages/meta/src/node-es-module-loader/loader.mts ./packages/playground/cli/src/cli.ts",
"command": "node --no-warnings=ExperimentalWarning --experimental-strip-types --experimental-transform-types --import ./packages/meta/src/node-es-module-loader/register.mts --watch ./packages/playground/cli/src/cli.ts",
"tty": true
}
},
Expand All @@ -57,7 +57,7 @@
"command": "node -e \"if (parseInt(process.versions.node) < 22) { console.error('Node.js version 22 or greater is required'); process.exit(1); }\"",
"forwardAllArgs": false
},
"node --experimental-strip-types --experimental-transform-types --import ./packages/meta/src/node-es-module-loader/register.mts --watch ./packages/playground/cli/src/cli.ts"
"node --no-warnings=ExperimentalWarning --experimental-strip-types --experimental-transform-types --import ./packages/meta/src/node-es-module-loader/register.mts --watch ./packages/playground/cli/src/cli.ts"
],
"tty": true,
"parallel": false
Expand Down