diff --git a/bin/setup-test-env.sh b/bin/setup-test-env.sh index 019e98b..0dbeb0d 100755 --- a/bin/setup-test-env.sh +++ b/bin/setup-test-env.sh @@ -150,7 +150,21 @@ EOF # Start WordPress Playground echo "Starting WordPress Playground..." - npx @wp-playground/client start --blueprint playground/blueprint.json --port 8888 & + if command_exists python3; then + python3 -m http.server 8888 --directory playground & + echo "Opening WordPress Playground in your browser..." + if command_exists open; then + open http://localhost:8888/index.html + elif command_exists xdg-open; then + xdg-open http://localhost:8888/index.html + elif command_exists start; then + start http://localhost:8888/index.html + else + echo "Please open http://localhost:8888/index.html in your browser" + fi + else + echo "Python3 is not installed. Please open playground/index.html in your browser." + fi # Wait for WordPress Playground to be ready echo "Waiting for WordPress Playground to be ready..." @@ -243,7 +257,21 @@ EOF # Start WordPress Playground echo "Starting WordPress Playground..." - npx @wp-playground/client start --blueprint playground/multisite-blueprint.json --port 8888 & + if command_exists python3; then + python3 -m http.server 8888 --directory playground & + echo "Opening WordPress Playground in your browser..." + if command_exists open; then + open http://localhost:8888/multisite.html + elif command_exists xdg-open; then + xdg-open http://localhost:8888/multisite.html + elif command_exists start; then + start http://localhost:8888/multisite.html + else + echo "Please open http://localhost:8888/multisite.html in your browser" + fi + else + echo "Python3 is not installed. Please open playground/multisite.html in your browser." + fi # Wait for WordPress Playground to be ready echo "Waiting for WordPress Playground to be ready..." diff --git a/playground/index.html b/playground/index.html new file mode 100644 index 0000000..c24ccc5 --- /dev/null +++ b/playground/index.html @@ -0,0 +1,25 @@ + + + + + + WordPress Playground + + + + + + diff --git a/playground/multisite.html b/playground/multisite.html new file mode 100644 index 0000000..5aec570 --- /dev/null +++ b/playground/multisite.html @@ -0,0 +1,25 @@ + + + + + + WordPress Playground - Multisite + + + + + +