diff --git a/blockly_uncompressed.js b/blockly_uncompressed.js deleted file mode 100644 index 804f97f0b..000000000 --- a/blockly_uncompressed.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * @fileoverview Bootstrap code to load Blockly in uncompiled mode. - */ -'use strict'; - - -/* eslint-disable no-var */ - -/** - * Blockly uncompiled-mode startup code. If running in a browser - * loads closure/goog/base.js and build/deps.js, then (in any case) - * requires Blockly.requires. - */ -(function(globalThis) { - /* eslint-disable-next-line no-undef */ - var IS_NODE_JS = !!(typeof module !== 'undefined' && module.exports); - - if (IS_NODE_JS) { - // Load Blockly. - goog.require('Blockly.requires'); - /* eslint-disable no-undef */ - module.exports = Blockly; - } else { - var BLOCKLY_DIR = ''; - // Find name of current directory. - var scripts = document.getElementsByTagName('script'); - var re = /(.+)[\\/]blockly_(?:.*)uncompressed\.js$/; - for (var script, i = 0; (script = scripts[i]); i++) { - var match = re.exec(script.src); - if (match) { - BLOCKLY_DIR = match[1]; - break; - } - } - if (!BLOCKLY_DIR) { - alert('Could not detect Blockly\'s directory name.'); - } - // Disable loading of closure/goog/deps.js (which doesn't exist). - globalThis.CLOSURE_NO_DEPS = true; - // Load Closure Library base.js (the only part of the libary we use, - // mainly for goog.require / goog.provide / goog.module). - document.write( - ''); - // Load dependency graph info from build/deps.js. To update - // deps.js, run `npm run build:deps`. - document.write( - ''); - // Load the rest of Blockly. - document.write(''); - } - /* eslint-disable-next-line no-invalid-this */ -})(this); diff --git a/scripts/gulpfiles/build_tasks.js b/scripts/gulpfiles/build_tasks.js index 9b6114bc5..1da8c3325 100644 --- a/scripts/gulpfiles/build_tasks.js +++ b/scripts/gulpfiles/build_tasks.js @@ -262,7 +262,7 @@ function buildJavaScript(done) { /** * This task updates DEPS_FILE (deps.js), used by - * blockly_uncompressed.js when loading Blockly in uncompiled mode. + * bootstrap.js when loading Blockly in uncompiled mode. * * Also updates TEST_DEPS_FILE (deps.mocha.js), used by the mocha test * suite. @@ -673,7 +673,6 @@ function buildAdvancedCompilationTest() { * php_compressed.js * lua_compressed.js * dart_compressed.js - * blockly_uncompressed.js * msg/json/*.js * test/deps*.js */ diff --git a/scripts/gulpfiles/config.js b/scripts/gulpfiles/config.js index af98fb579..02df80291 100644 --- a/scripts/gulpfiles/config.js +++ b/scripts/gulpfiles/config.js @@ -19,17 +19,16 @@ var path = require('path'); // - tests/scripts/compile_typings.sh // - tests/scripts/check_metadata.sh // - tests/scripts/update_metadata.sh -// - blockly_uncompressed.js (for location of deps.js) // - tests/bootstrap.js (for location of deps.js) // - tests/mocha/index.html (for location of deps.mocha.js) // Directory to write compiled output to. exports.BUILD_DIR = 'build'; -// Dependencies file (for blockly_uncompressed.js): +// Dependencies file (used by bootstrap.js in uncompiled mode): exports.DEPS_FILE = path.join(exports.BUILD_DIR, 'deps.js'); -// Dependencies file (for blockly_uncompressed.js): +// Mocha test dependencies file (used by tests/mocha/index.html): exports.TEST_DEPS_FILE = path.join(exports.BUILD_DIR, 'deps.mocha.js'); // Directory to write typings output to. diff --git a/tests/playground.html b/tests/playground.html index e15ee7684..7b724bca3 100644 --- a/tests/playground.html +++ b/tests/playground.html @@ -4,9 +4,8 @@ Blockly Playground - +