mirror of
https://github.com/google/blockly.git
synced 2026-05-13 15:40:11 +02:00
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
goog.module('Main');
|
|
|
|
// Core
|
|
// Either require 'Blockly.requires', or just the components you use:
|
|
/* eslint-disable-next-line no-unused-vars */
|
|
// TODO: I think we need to make sure these get exported?
|
|
// const {BlocklyOptions} = goog.requireType('Blockly.BlocklyOptions');
|
|
const {inject} = goog.require('Blockly.inject');
|
|
/** @suppress {extraRequire} */
|
|
goog.require('Blockly.geras.Renderer');
|
|
/** @suppress {extraRequire} */
|
|
goog.require('Blockly.VerticalFlyout');
|
|
/** @suppress {extraRequire} */
|
|
const {Msg} = goog.require('Blockly.Msg');
|
|
|
|
// Blocks
|
|
/** @suppress {extraRequire} */
|
|
goog.require('Blockly.libraryBlocks.logic');
|
|
/** @suppress {extraRequire} */
|
|
goog.require('Blockly.libraryBlocks.loops');
|
|
/** @suppress {extraRequire} */
|
|
goog.require('Blockly.libraryBlocks.math');
|
|
/** @suppress {extraRequire} */
|
|
goog.require('Blockly.libraryBlocks.texts');
|
|
/** @suppress {extraRequire} */
|
|
goog.require('testBlocks');
|
|
|
|
|
|
function init() {
|
|
Object.assign(Msg, window['Blockly']['Msg']);
|
|
inject('blocklyDiv', /** @type {BlocklyOptions} */ ({
|
|
'toolbox': document.getElementById('toolbox')
|
|
}));
|
|
};
|
|
window.addEventListener('load', init);
|