原文地址:https://github.com/LLK/scratch-gui/wiki/Getting-Startedhtml
[Smokey needs Your help to keep this documentation up to date!]node
The staging version of the Scratch GUI, a.k.a. the to-be-released Scratch 3.0 Editor, can be viewed at https://llk.github.io/scratch-gui/.git
The Scratch editor is built up modularly from several repos. Each can stand alone, but for development purposes you may need to make dependent changes in multiple repos at once. This guide covers how to link repos.github
You probably won't need all the repos. Clone the repo for the issue you are working on, and clone and link other repos as you need them.web
The main ones are:npm
There are also others, like scratch-storage and scratch-audio.windows
brew install node
)
brew install git
)cd
into itnpm install
- gets dependenciesnpm start
- starts local server which is hot reloadedcd
into itnpm install
- gets dependenciesnpm run watch
- starts local server, and also will tell gui to reload if it changescd
into itnpm install
- gets dependencies -- If you run into the error 'Closure not found', follow the instructions on the scratch-blocks wiki to install the closure library.npm link
npm run watch
, you need to run npm run prepublish
each time you make a change to scratch blocks that should be reflected in the GUI, then hard refresh. (No hot reloading)cd
the dependency repo and run npm link
cd
the GUI and run npm link <dependency>
mkdir Scratch
markdown
cd Scratch
app
git clone https://github.com/llk/scratch-gui # if making changes fork the project and check out your copy
ide
git clone https://github.com/llk/scratch-vm # if making changes fork the project and check out your copy
git clone https://github.com/llk/scratch-blocks # if making changes fork the project and check out your copy
cd scratch-vm
npm install
npm link
npm run watch
cd ../scratch-blocks
npm install
npm link
cd ../scratch-gui
npm install
npm link scratch-vm scratch-blocks
npm start