fix: Rename Generator to CodeGenerator (#6585)

Stops collisions with ES6's Generator.
The old Blockly.Generator still exists as a name, but is now deprecated.
This commit is contained in:
Neil Fraser
2022-10-28 01:59:00 +02:00
committed by GitHub
parent 2311a94b03
commit e90aba9273
46 changed files with 155 additions and 158 deletions

View File

@@ -178,7 +178,7 @@ function stripApacheLicense() {
* For a full list of closure compiler groups, consult the output of
* google-closure-compiler --help or look in the source here:
* https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/DiagnosticGroups.java#L117
*
*
* The list in JSCOMP_ERROR contains all the diagnostic groups we know
* about, but some are commented out if we don't want them, and may
* appear in JSCOMP_WARNING or JSCOMP_OFF instead. Items not
@@ -281,7 +281,7 @@ var JSCOMP_OFF = [
* core/utils/*. We were downgrading access control violations
* (including @private) to warnings, but this ends up being so
* spammy that it makes the compiler output nearly useless.
*
*
* Once ES module migration is complete, they will be re-enabled and
* an alternative to @package will be established.
*/
@@ -480,7 +480,7 @@ function chunkWrapper(chunk) {
browserDepsExpr = `root.${chunk.parent.reexport}`;
factoryArgs = '__parent__';
namespaceExpr = `${factoryArgs}.${NAMESPACE_PROPERTY}`;
}
}
// Code to assign the result of the factory function to the desired
// export location when running in a browser. When

View File

@@ -36,9 +36,9 @@ For samples on how to integrate Blockly into your project, view the list of samp
### Importing Blockly
When you import Blockly with ``import * as Blockly from 'blockly';`` you'll get the default modules:
Blockly core, Blockly built-in blocks, the JavaScript generator and the English lang files.
Blockly core, Blockly built-in blocks, the JavaScript generator and the English lang files.
If you need more flexibility, you'll want to define your imports more carefully:
If you need more flexibility, you'll want to define your imports more carefully:
#### Blockly Core

View File

@@ -2,4 +2,4 @@
(function (<%= param %>){
<%= contents %>
module.exports = <%= exports %>;
})(<%= cjs %>);
})(<%= cjs %>);

View File

@@ -13,4 +13,4 @@
}(this, function() {
<%= contents %>
return Blockly.Msg;
}));
}));

View File

@@ -10,4 +10,4 @@
}(this, function(<%= param %>) {
<%= contents %>
return <%= exports %>;
}));
}));