blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Provide an example of custom Blockly generator bundled in a ES6 module

Open lypwig opened this issue 4 years ago • 0 comments

Category

  • Examples

Component

A new project in the examples folder, that includes a custom Blockly generator as a ES6 module ready to be published on npm.

Is your feature request related to a problem? Please describe.

I am having trouble to create a simple ES6 module of a Blockly generator.

Describe the solution you'd like

I would like an MVP of a Blockly generator as a ES6 module, that can be used with import 'my-generator'; just like we do with import 'blockly/python';.

This example folder will probably include a gulp script that produces the ES6 module, similarly to blockly's gulp package tasks.

The purpose is not to learn how to write a custom generator, but to understand how to bundle a custom generator to a ES6 module. The custom generator used in the example could be for instance the json generator used in codelabs.

lypwig avatar Jul 27 '21 11:07 lypwig