-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(blocks): Export block definitions (#5908)
* refactor: Provide a BlockDefinition type * refactor: Split defineBlocksWithJsonArray Split defineBlocksWithJsonArray into: - createBlockDefinitionsFromJsonArray, which creates BlockDefinitions from a (possibly JSON-originated) POJsO array, having no side-effects except possibly issuing warnings to the console. - defineBlocks, which add any dictionary of BlockDefinitions to the Blocks dictionary. * feat(blocks): Export block definitions per-module - Define all blocks in a local blocks dictionary, often using createBlockDefinitionFromJsonArray, without registering them. - Separately, use defineBlocks to register the exported BlockDefinitions at the end of each Blockly.blocks.* module. - In Blockly.blocks.all, create a blocks export that combines all of the blocks exports from the individual blocks modules. * chore: have format script run clang-format on blocks/ too
- Loading branch information
Showing
16 changed files
with
206 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.