forked from google/blockly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix!: Export loopTypes from Blockly.blocks.loops (google#5900)
* refactor(blocks): Make loopTypes a Set This is likely to slightly improve performance, especially if there are many entries. * refactor(blocks): Re-export individual block modules from Blockly.blocks.all * fix!(blocks): Have blocks_compressed.js export Blockly.blocks.all Previously the value obtained by const blocks = require('blockly/blocks'); // Node.js or import blocks from 'blockly/blocks.js'; // ES Modules would be the block definitions dictionary (Blockly.Blocks). Change this so that it is instead the export object from Blockly.blocks.all. This means you can now access loopTypes via: import blocks from 'blockly/blocks.js'; blocks.loops.loopTypes.add('my_loop_blocktype'); This is a breaking change for any code which depended on the value that was exported by blocks_compressed.js. BREAKING CHANGE: the exports provided by blocks_compressed.js (and therefore by `import ... from 'blockly/blocks'`) have changed; see above.
- Loading branch information
1 parent
423d2e5
commit 4f74210
Showing
4 changed files
with
32 additions
and
19 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.