|
@@ -1,58 +0,0 @@
|
|
|
-/*---------------------------------------------------------------------------------------------
|
|
|
- * Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
- * Licensed under the MIT License. See License.txt in the project root for license information.
|
|
|
- *--------------------------------------------------------------------------------------------*/
|
|
|
-
|
|
|
-//@ts-check
|
|
|
-
|
|
|
-const glob = require('glob');
|
|
|
-const { removeDir, tsc, buildESM, buildAMD } = require('../build/utils');
|
|
|
-
|
|
|
-removeDir(`monaco-languages/release`);
|
|
|
-removeDir(`monaco-languages/out`);
|
|
|
-
|
|
|
-tsc(`monaco-languages/src/tsconfig.json`);
|
|
|
-
|
|
|
-glob('src/*/*.contribution.ts', { cwd: __dirname }, function (err, files) {
|
|
|
- if (err) {
|
|
|
- console.error(err);
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- const languages = files.map((file) => file.split('/')[1]);
|
|
|
-
|
|
|
- // ESM
|
|
|
- {
|
|
|
- /** @type {string[]} */
|
|
|
- const entryPoints = ['src/monaco.contribution.ts', 'src/_.contribution.ts'];
|
|
|
- const external = ['monaco-editor-core', '*/_.contribution'];
|
|
|
- for (const language of languages) {
|
|
|
- entryPoints.push(`src/${language}/${language}.contribution.ts`);
|
|
|
- entryPoints.push(`src/${language}/${language}.ts`);
|
|
|
- external.push(`*/${language}.contribution`);
|
|
|
- external.push(`*/${language}`);
|
|
|
- }
|
|
|
- buildESM({
|
|
|
- base: 'monaco-languages',
|
|
|
- entryPoints,
|
|
|
- external
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- // AMD
|
|
|
- {
|
|
|
- buildAMD({
|
|
|
- base: 'monaco-languages',
|
|
|
- entryPoint: 'src/monaco.contribution.ts',
|
|
|
- amdModuleId: 'vs/basic-languages/monaco.contribution',
|
|
|
- amdDependencies: ['vs/editor/editor.api']
|
|
|
- });
|
|
|
- for (const language of languages) {
|
|
|
- buildAMD({
|
|
|
- base: 'monaco-languages',
|
|
|
- entryPoint: `src/${language}/${language}.ts`,
|
|
|
- amdModuleId: `vs/basic-languages/${language}/${language}`
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
-});
|