-
Notifications
You must be signed in to change notification settings - Fork 605
Build
Developers of Blockly Games need to build the project in order to make changes.
First, download the source code. Git is the easiest:
git clone https://github.com/google/blockly-games.git
Or just download a ZIP:
https://github.com/google/blockly-games/archive/master.zip
Enter the Blockly Games directory you just created, and get/build the dependencies (Blockly, Closure Compiler, JS-Interpreter, Babel, Ace, SoundJS):
cd blockly-games/
make deps
The next step is to build all the games:
make games
It takes about two minutes. There shouldn't be any errors.
While developing a game, it is nice to be able to quickly recompile only a single game. Here are the build commands for the existing games:
make index
make puzzle
make maze
make bird
make turtle
make movie
make music
make pond-tutor
make pond-duck
make gallery
The previously mentioned make games
is just a shortcut for all the above commands.
Point a browser at blockly-games/server/html/index.html
and you should see all the games.
To avoid having to recompile after small changes, visit
/admin
(or blockly-games/server/html/admin.html
if being served directly off a file system)
to switch to uncompressed mode.
Now you can just press reload in the browser to get the latest
version after most changes. Note that changes to dependencies
(goog.require
) still require a recompile.