I am not finding this (not requiring blockly to be rebuilt) to be the case, but perhaps I am missing something? In my previous configuration, using node-blockly, I have many custom blocks and many NEW languages (micropython, ink language, etc.) with corresponding language generators for standard and new custom blocks. Following the
blockly documentation, when I added a new custom language such as ink, I would
1. I would add a new file, ib_blocks.js into the blocks directory. This file would include all of the js definitions for my custom blocks.
2. add a new file (infuse.js) into the generators directory that created a new generator (Blockly.Infuse = new Blockly.Generator('Infuse'); ) This file would also include all of the js definitions for all of the "rules" of the language. This mirrored, for instance, the lua.js file in the same directory.
3. Then, I would create a new folder (infuse) into the generators directory with all of the separate js files defining the code generation for the standard blockly blocks as well as my own custom blocks. This again mirrored the contents of the "lua" folder in the generators folder (only it included infuse-specific language generators.
4. As is described in the
blockly documentation, "Blockly comes with both the source code and compressed files, so there is no need to build Blockly unless you are hacking in the
core,
blocks,
generators, or
msg directories.", since I was modifying the generators and blocks directories, I then rebuilt blockly using the various "npm run build" commands as necessary. This would create the corresponding infuse_compressed.js for my new language, as well as updating blocks_compressed.js and this all worked great!
When using the npm package of blockly, if this is no longer necessary, how specifically would you add a brand new custom language? When you say "import" your custom blocks and generators can you be more specific?
Thanks!