mirror of
https://github.com/google/blockly.git
synced 2026-01-11 02:47:09 +01:00
This drops the compiled size by 25 kb if there are no categories. Which also indicates that the toolbox itself suffers from really bad bloat. The toolbox should not represent 1/6th of our codebase.
71 lines
2.5 KiB
JavaScript
71 lines
2.5 KiB
JavaScript
/**
|
|
* @license
|
|
* Visual Blocks Editor
|
|
*
|
|
* Copyright 2019 Google Inc.
|
|
* https://developers.google.com/blockly/
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
/**
|
|
* @fileoverview Default Blockly entry point. Use this to pick and choose which
|
|
* fields and renderers to include in your Blockly bundle.
|
|
* @author samelh@google.com (Sam El-Husseini)
|
|
*/
|
|
'use strict';
|
|
|
|
goog.provide('Blockly.requires');
|
|
|
|
// Blockly Core (absolutely mandatory).
|
|
goog.require('Blockly');
|
|
|
|
|
|
// If block comments aren't required, then Blockly.inject's "comments"
|
|
// configuration must be false, and no blocks may be loaded from XML which
|
|
// define comments.
|
|
goog.require('Blockly.Comment');
|
|
// If the toolbox does not have categories and only has a simple flyout, then
|
|
// 'Blockly.Toolbox' is not needed.
|
|
goog.require('Blockly.Toolbox');
|
|
// If a trashcan on the workspace isn't required, then Blockly.inject's
|
|
// "trashcan" configuration must be false.
|
|
goog.require('Blockly.Trashcan');
|
|
// If zoom controls aren't required, then Blockly.inject's
|
|
// "zoom"/"controls" configuration must be false.
|
|
goog.require('Blockly.ZoomControls');
|
|
|
|
|
|
// Block dependencies.
|
|
// None of these should be required since individual block files should
|
|
// include the requirements they depend on.
|
|
// goog.require('Blockly.Mutator');
|
|
// goog.require('Blockly.FieldAngle');
|
|
// goog.require('Blockly.FieldCheckbox');
|
|
// goog.require('Blockly.FieldColour');
|
|
// goog.require('Blockly.FieldDropdown');
|
|
// goog.require('Blockly.FieldLabelSerializable');
|
|
// goog.require('Blockly.FieldImage');
|
|
// goog.require('Blockly.FieldTextInput');
|
|
// goog.require('Blockly.FieldMultilineInput');
|
|
// goog.require('Blockly.FieldNumber');
|
|
// goog.require('Blockly.FieldVariable');
|
|
|
|
|
|
// Blockly Renderers.
|
|
// At least one renderer is mandatory. Geras is the default one.
|
|
// Others may be chosen using Blockly.inject's "renderer" configuration.
|
|
goog.require('Blockly.geras.Renderer');
|
|
// goog.require('Blockly.thrasos.Renderer');
|
|
// goog.require('Blockly.zelos.Renderer');
|