-
-
Notifications
You must be signed in to change notification settings - Fork 223
Getting Started
These are the instructions for setting up the TurboWarp development environment or making custom builds on your own computer.
If you just want to use TurboWarp, visit https://turbowarp.org/. You don't need to follow these instructions.
Make sure you have these installed:
You might have to restart your terminal or computer for them to be fully installed.
Also note that Scratch, and by consequence TurboWarp, are very large and may take a lot of time, disk space, and bandwidth.
The GUI is the minimum to TurboWarp built.
# if you intend to modify the code and submit a PR, make a fork in GitHub and clone that repository instead
git clone https://github.com/TurboWarp/scratch-gui
cd scratch-gui
npm install
npm start
scratch-gui will load TurboWarp's forks of scratch-vm and scratch-render from GitHub automatically. However, you must obtain these separately if you wish to modify them.
If you're interested in changing parts of TurboWarp other than the GUI, you have to do extra steps. You do not need to do this if you are only interesting in scratch-gui.
# if you intend to modify the code and submit a PR, make a fork in GitHub and clone that repository instead
git clone https://github.com/TurboWarp/scratch-vm
git clone https://github.com/TurboWarp/scratch-render
cd scratch-vm
npm install
npm link
cd ..
cd scratch-render
npm install
npm link
cd ..
cd scratch-gui
npm link scratch-vm scratch-render
This will setup the repositories and link them so that scratch-gui will use your local versions instead of scratch-vm and scratch-render instead of the ones on GitHub.
When deploying TurboWarp to a website, you should enable production mode. This will result in faster execution and a greatly reduced file size.
# in the `scratch-gui` folder
# mac, linux
NODE_ENV=production npm run build
# windows command prompt (untested)
set NODE_ENV=production
npm run build
# windows powershell
$env:NODE_ENV="production"
npm run build
By default TurboWarp generates links like https://turbowarp.org/editor.html#123 However, by setting ROOT=/
and ROUTING_STYLE=wildcard
(in the same way that you set NODE_ENV=production
), you can get routes like https://turbowarp.org/123/editor instead. Note that this requires a server that will setup the proper aliases. The webpack development server in scratch-gui is setup for this. For production you'd want something more like https://github.com/TurboWarp/turbowarp.org
The build output is in the build
folder.