Files organization - blocks creation
Closed this issue · 0 comments
SebCanet commented
Discussion about the way blocks are defined in many files.
Actually (servomotor example):
- blocklyduino\blocks\servo\servo.js: blocks design, 1 file per several blocks but 1 file and folder per type/category. in the folder, all needed design/picture.
- arduino\addon\servo.js: generators for Arduino, with same name as block design
- msg\blocks_en.js: english blocks translation, all blocks are translated in 1 file, 1 file per language
What could be easier to create blocks:
- blocklyduino\blocks\servo\servo.blockly: blocks design, 1 file per several blocks but 1 file and folder per type/category. in the folder, all needed design/picture.
- blocklyduino\blocks\servo\servo.arduino: generator for Arduino, with same name as block design
- blocklyduino\blocks\servo\servo.en: english blocks translation, 1 file per language (servo.fr, servo.es, etc)
But to avoid implementinig all this boring list of js files, I think use something like head.js (https://github.com/headjs/headjs) and create 'master' file to call all design, all generators, etc.
Any idea?