LilMonk / blockly

The web-based visual programming editor.

Home Page:https://developers.google.com/blockly/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blockly

Google's Blockly is a web-based, visual programming editor. Users can drag blocks together to build programs. All code is free and open source.

The project page is https://developers.google.com/blockly/

You use this git repo to build the msg directory and the blockly-compressed.js for the Open-Roberta lab.

Build the Resources for the Open-Roberta Lab

On linux systems one possibility is

  • you have the closure-library next to this project (you need version 20200719.0.0)
  • you have installed the closure compiler via npm:
    • e.g. npm install --save google-closure-compiler
    • check the version: npx google-closure-compiler --version => v20200719
  • you have installed python 2.7 (:-<)
  • run the build.py script

A better solution on both linux and windows systems is

  • you have installed docker
  • docker run --mount type=bind,source=:your-blockly-git:,destination=/opt/blockly/blockly openroberta/blocklybuilder:1.0.0
  • in this case no python 2 installation, no closure compiler installation, no closure compiler resources

Workflow

  • you have cloned the blockly git https://github.com/OpenRoberta/blockly.git into :your-blockly-git:
  • you have a feature branch git checkout -b feature/myChanges
  • you edit a file in the blocks folder to add or change a blockly block and edit the file robMsg/robMessages.js to add or change a message and then re-build the resources. Use one of the possibilities described above. Never change a file in the msg folder, because these changes would be overwritten by the next build.
  • check your changes in the blockly playground found in the directory tests. One of the many playgrounds will fit your need. You may copy one and modify it. If you are satisfies with your results, continue.
  • try your results in the Open-Roberta lab: copy the msg directory and the blockly-compressed.js into :your-openroberta-lab-git:/OpenrobertaServer/staticResources/blockly. If you are satisfies with your results, continue.
  • rebase on master: git fetch;git rebase master
  • merge to master: git checkout master;git merge feature/myChanges;git push
  • later delete your feature branch git branch -d feature/myChanges
  • your changes to blockly are now persisted in the blockly repo and in your :your-openroberta-lab-git:. In the feature you'll commit these changes in the feature branch and eventually you'll merge your changes to develop.

Note, that the blockly repo only provides a master branch. There is no high traffix with this repo and thus it ok to simplify the repo structure.

About

The web-based visual programming editor.

https://developers.google.com/blockly/

License:Apache License 2.0


Languages

Language:JavaScript 96.1%Language:HTML 3.3%Language:Python 0.4%Language:CSS 0.1%Language:Dockerfile 0.0%Language:Shell 0.0%