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
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

This repository contains the tools and applications built using [WordPress Playground](https://developer.wordpress.org/playground/):

* [Interactive Code Block for Gutenberg](./packages/interactive-code-block/)
* [WordPress Playground for Visual Studio Code](./packages/vscode-extension/)
- [Interactive Code Block for Gutenberg](./packages/interactive-code-block/)
- [WordPress Playground for Visual Studio Code](./packages/vscode-extension/)
- [wp-now](./packages/wp-now/)

If you were looking for the Playground itself, you can find it here: [WordPress Playground](https://developer.wordpress.org/playground/)

Expand Down
19 changes: 19 additions & 0 deletions bin/wp-now
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

if [[ $(uname -s) == 'Darwin' ]]; then
SCRIPT_PATH=$(realpath "$0")
else
SCRIPT_PATH=$(readlink -f "$0")
fi
SCRIPT_DIR=$(dirname "$SCRIPT_PATH")

ARGS="$@"
if [[ "$@" != *"--path="* ]]; then
ARGS="$@ --path=$PWD"
fi

cd $SCRIPT_DIR/..
export NVM_DIR=$HOME/.nvm;
source $NVM_DIR/nvm.sh;
nvm use
npx nx preview wp-now $ARGS
Loading