diff --git a/packages/playground/cli/README.md b/packages/playground/cli/README.md index 4599882c94..247e7be6c0 100644 --- a/packages/playground/cli/README.md +++ b/packages/playground/cli/README.md @@ -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 @@ -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. diff --git a/packages/playground/cli/project.json b/packages/playground/cli/project.json index 3e066764ff..9ed89baa92 100644 --- a/packages/playground/cli/project.json +++ b/packages/playground/cli/project.json @@ -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 } }, @@ -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