Files
blockly/scripts/package/templates/umd-msg.template
Beka Westberg 2a7d6b08b5 fix: loading messages from script tags. (#6184)
* fix: loading messages in the browser

* chore: fix comment

* fix: change unwrapped message files to write to a new object, rather than Blockly.Msg

* fix: fixup exports

* fix: PR comments

* fix: change to use for-in loop

* fix: ES6 compatibility and formatting
2022-06-13 14:13:54 -07:00

17 lines
432 B
Plaintext

/* eslint-disable */
;(function(root, factory) {
if (typeof define === 'function' && define.amd) { // AMD
define(<%= amd %>, factory);
} else if (typeof exports === 'object') { // Node.js
module.exports = factory();
} else { // Browser
var messages = factory();
for (var key in messages) {
root.<%= namespace %>[key] = messages[key];
}
}
}(this, function() {
<%= contents %>
return messages;
}));