Useful things
SheepTester opened this issue · 6 comments
btw explorer .
opens pwd in windows explorer in git bash, pretty cool
Cloning
Use --depth
to make cloning/fetching faster?
# Preserve links
npm install -g npm-safe-install
git clone https://github.com/SheepTester/scratch-gui.git
cd scratch-gui
git remote add upstream https://github.com/LLK/scratch-gui.git
Update
Run git fetch upstream develop
then git merge upstream/develop
when in the proper branch (16-9
or vanilla-vm-min
).
If package-lock.json
gets annoying and causes a phatte merge conflict, do git checkout --theirs package-lock.json
(seems like you'll also have to do git add package-lock.json
afterwards)
Then do nsi
from npm-safe-install, not npm install
because it breaks links.
Start
In each of the other repos,
- run
npm run watch
if you intend to modify them, or - run
npm run build
once if you don't intend on editing the repo
If it fails because of something to do with schema-utils
, run nsi
once more and try again.
Then, run npm start
in gui; http://localhost:8601/
Publish
NODE_ENV=production npm run build
npm run deploy
(no longer needed because #31)-a
is important to not overwrite /16-9/
(see 5053304); this is what -a
does
(npm run deploy -- -e branch-name
will publish to /branch-name/
)
vm.min.js
Used by the HTMLifier, available at https://sheeptester.github.io/scratch-vm/vm.min.js
E羊icques
# in scratch-vm
git checkout 16-9
nsi
NODE_ENV=production npm run build
npm run deploy -- -e 16-9
Vanilla
# in scratch-vm
git checkout vanilla-vm-min
nsi
NODE_ENV=production npm run build
npm run deploy -- -a
See changes for 16-9
in:
Ok vim is cool. Create a new terminal tab using :tab terminal
; close the current tab using :q
; ctrl + W then N to enter command, then press i to continue using the terminal
To paste, shift + insert (or shift + fn + forward delete)
Getting started: cloning and linking the repositories
TODO: Maybe https://yarnpkg.com/features/workspaces is better
npm install -g npm-safe-install
git clone --depth=1 https://github.com/SheepTester/scratch-svg-renderer.git
cd scratch-svg-renderer
git remote add upstream https://github.com/LLK/scratch-svg-renderer.git
git fetch --depth=1 upstream develop
npm link
cd ..
git clone --depth=1 https://github.com/SheepTester/scratch-paint.git
cd scratch-paint
git remote add upstream https://github.com/LLK/scratch-paint.git
git fetch --depth=1 upstream develop
npm link
cd ..
git clone --depth=1 https://github.com/SheepTester/scratch-vm.git
cd scratch-vm
git remote add upstream https://github.com/LLK/scratch-vm.git
git fetch --depth=1 upstream develop
npm link
npm link scratch-svg-renderer
cd ..
git clone --depth=1 https://github.com/SheepTester/scratch-gui.git
cd scratch-gui
git remote add upstream https://github.com/LLK/scratch-gui.git
git fetch --depth=1 upstream develop
npm link scratch-svg-renderer scratch-paint scratch-vm
nsi
Note: npm link
seems to also do npm install
Note: I had to do nsi -- --legacy-peer-deps
for some reason
Tip: Use GitHub's web interface to merge from upstream, then git pull
Building
# Starting from the eyangicques folder
cd scratch-svg-renderer
nsi && npm run build &
cd ..
cd scratch-paint
nsi && npm run build &
cd ..
cd scratch-vm
nsi && npm run build &
cd ..
cd scratch-gui
npm start
then git pull