Skip to content

Commit

Permalink
Switch to bash for v1/init, see phetsims/chipper#1345
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jan 9, 2025
1 parent f9c626a commit 8cd59ae
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 225 deletions.
36 changes: 36 additions & 0 deletions bin/v1/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Exit immediately if a command exits with a non-zero status.
set -e

# Install root NPM dependencies
npm install

# Clone missing repositories
./bin/clone-missing-repos.sh

# Checkout the desired branch TODO: Change to phetsims-v1
./bin/checkout-branch.sh main

# Install NPM dependencies in 'perennial-alias'
cd ../perennial-alias
npm install

# Install NPM dependencies in 'chipper'
cd ../chipper
npm install

# Start transpiler and HTTP server concurrently
# Using & to run them in the background
../perennial-alias/bin/sage run js/grunt/tasks/transpile.ts --live & # Start transpiler

# TODO: change to perennial
cd ../perennial-alias
npx http-server ../ -p 80 -c --silent & # Start HTTP server

echo "######################################################"
echo "# Ready! Open http://localhost/phetmarks in your browser. Transpiler will output below."
echo "######################################################"

# Wait for both background processes to keep the script running
wait
224 changes: 0 additions & 224 deletions js/scripts/init-v1.ts

This file was deleted.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"type-check-all": "grunt type-check --all --clean",
"lint-all": "grunt lint --all --clean",
"scenerystack-test": "bash bin/sage run js/scripts/scenerystack-test.ts",
"init-v1": "npm install && bash bin/sage run js/scripts/init-v1.ts && npm run start-v1"
"init-v1": "bash bin/v1/init.sh"
},
"devDependencies": {
"@octokit/rest": "~16.33.1",
Expand Down Expand Up @@ -46,6 +46,7 @@
"graceful-fs": "~4.1.11",
"grunt": "~1.5.3",
"html-differ": "~1.4.0",
"http-server": "^14.1.1",
"lodash": "~4.17.10",
"mimelib": "~0.2.19",
"minimist": "~1.2.8",
Expand Down

0 comments on commit 8cd59ae

Please sign in to comment.