Blockly (Microsoft MakeCode fork)
Major additions and changes in this fork:
- scratch-blocks rendering of the blocks block_render_svg.js
- Using insertion markers instead of dragged connections insertion_marker_manager.js
- Inverted and coloured toolbox modes toolbox.js
- Supports disabled categories toolbox.js
- Supports icons in the toolbox
- Adds a number slider field field_slider.js
- Zoom in / out with touch gestures touch_gesture.js
- Workspace comments that appear like sticky notes workspace_comment.js
- A number of Edge & IE fixes
- Support underlining and icons in flyout labels flyout_button.js
- Support for multiple flyouts per toolbox for performance reasons pxt_blockly_functions.js
- node, npm
git clone https://github.com/google/closure-library cd closure-library git checkout v20180805 cd ../ git clone https://github.com/Microsoft/pxt-blockly cd pxt-blockly npm install .
npm run build:core --closure-libraryto build blockly (install
npm install -g gulp)
gulp typingsto regenerate blockly.d.ts
Testing local changes in PXT
npm run pxt:testto generate the blockly-compressed, blocks-compressed, and typings files, and copy them to pxt-blockly
gulpin pxt to rebuild the pxt blockly files
pxt clean && pxt servein the target directory (eg pxt-arcade, or pxt-minecraft)
This can be combined into one command (starting from the target directory):
cd ../pxt-blockly && npm run pxt:test && cd ../pxt && gulp && cd ../pxt-arcade && pxt clean && pxt serve --rb
Make sure you've checked out the correct closure-library (see above)
Updating pxt-blockly in PXT
gulp bump --closure-libraryto bump blockly version, commit, and tag.
After the Travis has deployed the package to npm, update the pxt-blockly version in
package.jsonin the pxt repo.
There is a playground manual testing page at tests/playground.html, which requires no build step or server running.
The original Google/Blockly is licensed under Apache License (Version 2.0).
New code is licensed under MIT.