mirror of
https://github.com/google/blockly.git
synced 2026-01-11 19:07:08 +01:00
chore(tests): Add ".loader" infix to shim filenames.
Per suggestion on PR #7380, have buildShims name the shims ${chunk.name}.loader.mjs instead of just `${chunk.name}.mjs`.
This commit is contained in:
@@ -677,7 +677,8 @@ function buildCompiled() {
|
|||||||
/**
|
/**
|
||||||
* This task builds the shims used by the playgrounds and tests to
|
* This task builds the shims used by the playgrounds and tests to
|
||||||
* load Blockly in either compressed or uncompressed mode, creating
|
* load Blockly in either compressed or uncompressed mode, creating
|
||||||
* build/blockly.mjs, blocks.mjs, javascript.mjs, etc.
|
* build/blockly.loader.mjs, blocks.loader.mjs, javascript.loader.mjs,
|
||||||
|
* etc.
|
||||||
*
|
*
|
||||||
* Prerequisite: getChunkOptions (via buildCompiled, for chunks[].parent).
|
* Prerequisite: getChunkOptions (via buildCompiled, for chunks[].parent).
|
||||||
*/
|
*/
|
||||||
@@ -702,7 +703,7 @@ async function buildShims() {
|
|||||||
const modulePath = posixPath(chunk.moduleEntry ?? chunk.entry);
|
const modulePath = posixPath(chunk.moduleEntry ?? chunk.entry);
|
||||||
const scriptPath =
|
const scriptPath =
|
||||||
path.posix.join(RELEASE_DIR, `${chunk.name}${COMPILED_SUFFIX}.js`);
|
path.posix.join(RELEASE_DIR, `${chunk.name}${COMPILED_SUFFIX}.js`);
|
||||||
const shimPath = path.join(BUILD_DIR, `${chunk.name}.mjs`);
|
const shimPath = path.join(BUILD_DIR, `${chunk.name}.loader.mjs`);
|
||||||
const parentImport =
|
const parentImport =
|
||||||
chunk.parent ? `import ${quote(`./${chunk.parent.name}.mjs`)};` : '';
|
chunk.parent ? `import ${quote(`./${chunk.parent.name}.mjs`)};` : '';
|
||||||
const exports = await import(`../../${modulePath}`);
|
const exports = await import(`../../${modulePath}`);
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
import {COMPRESSED, loadScript} from './scripts/load.mjs';
|
import {COMPRESSED, loadScript} from './scripts/load.mjs';
|
||||||
|
|
||||||
import * as Blockly from '../build/blockly.mjs';
|
import * as Blockly from '../build/blockly.loader.mjs';
|
||||||
import '../build/blocks.mjs';
|
import '../build/blocks.loader.mjs';
|
||||||
|
|
||||||
await loadScript('../build/msg/en.js');
|
await loadScript('../build/msg/en.js');
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
import {COMPRESSED, loadScript} from './scripts/load.mjs';
|
import {COMPRESSED, loadScript} from './scripts/load.mjs';
|
||||||
|
|
||||||
import * as Blockly from '../build/blockly.mjs';
|
import * as Blockly from '../build/blockly.loader.mjs';
|
||||||
import '../build/blocks.mjs';
|
import '../build/blocks.loader.mjs';
|
||||||
import {dartGenerator} from '../build/dart.mjs';
|
import {dartGenerator} from '../build/dart.loader.mjs';
|
||||||
import {luaGenerator} from '../build/lua.mjs';
|
import {luaGenerator} from '../build/lua.loader.mjs';
|
||||||
import {javascriptGenerator} from '../build/javascript.mjs';
|
import {javascriptGenerator} from '../build/javascript.loader.mjs';
|
||||||
import {phpGenerator} from '../build/php.mjs';
|
import {phpGenerator} from '../build/php.loader.mjs';
|
||||||
import {pythonGenerator} from '../build/python.mjs';
|
import {pythonGenerator} from '../build/python.loader.mjs';
|
||||||
|
|
||||||
await loadScript('../build/msg/en.js');
|
await loadScript('../build/msg/en.js');
|
||||||
await loadScript('playgrounds/screenshot.js');
|
await loadScript('playgrounds/screenshot.js');
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
<script type="module">
|
<script type="module">
|
||||||
import {loadScript} from '../scripts/load.mjs';
|
import {loadScript} from '../scripts/load.mjs';
|
||||||
|
|
||||||
import * as Blockly from '../../build/blockly.mjs';
|
import * as Blockly from '../../build/blockly.loader.mjs';
|
||||||
import '../../build/blocks.mjs';
|
import '../../build/blocks.loader.mjs';
|
||||||
// Generators not needed (but see also bug #6597).
|
// Generators not needed (but see also bug #6597).
|
||||||
|
|
||||||
await loadScript('../../build/msg/en.js');
|
await loadScript('../../build/msg/en.js');
|
||||||
|
|||||||
Reference in New Issue
Block a user