Skip to content
Andrew Sliwinski edited this page May 16, 2016 · 17 revisions

Getting Started

Scratch Blocks is designed to easily install into any web application. The blocks are 100% client-side, requiring no support from the server. There are no 3rd party dependencies (unless one wants to recompile the core). Everything is open source.

Scratch Blocks is based on Google's Blockly project. For a full API reference please see Google's Custom Blocks documentation.

Installation

Configuration


Building

Before sharing with users, we recommend that you build and compress Scratch Blocks. Building requires Python 2 and an internet connection as it uses Google's online Closure Compiler. Once you are ready, you can build by running the following in your console:

python build.py

This will export multiple files including:

blockly_uncompressed_vertical.js
blockly_uncompressed_horizontal.js
blockly_compressed_vertical.js
blockly_compressed_horizontal.js
blocks_compressed.js
msg/js/en.js

These can then be used in your project by updating the HTML of your application:

<script src="blockly_compressed_horizontal.js"></script>
<script src="blocks_compressed.js"></script>
<script src="msg/js/en.js"></script>
Clone this wiki locally