scratch-gui icon indicating copy to clipboard operation
scratch-gui copied to clipboard

Useful things

Open SheepTester opened this issue 6 years ago • 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

~~-a is important to not overwrite /16-9/ (see 5053304ef964432fe9634b767cf96a044599cd01); this is what -a does~~ (no longer needed because #31)

(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

SheepTester avatar Jul 27 '19 21:07 SheepTester

See changes for 16-9 in:

SheepTester avatar Dec 23 '19 20:12 SheepTester

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)

SheepTester avatar May 31 '20 22:05 SheepTester

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

SheepTester avatar Apr 11 '21 19:04 SheepTester

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

SheepTester avatar Apr 11 '21 19:04 SheepTester

https://github.com/SheepTester/scratch-gui/compare/16-9...LLK:develop

https://github.com/SheepTester/scratch-vm/compare/16-9...LLK:develop

https://github.com/SheepTester/scratch-paint/compare/16-9...LLK:develop

https://github.com/SheepTester/scratch-svg-renderer/compare/16-9...LLK:develop

SheepTester avatar Apr 30 '21 23:04 SheepTester

then git pull

SheepTester avatar Apr 30 '21 23:04 SheepTester