mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Adopt esbuild for monaco-json
This commit is contained in:
parent
6bfac402fb
commit
a50081289e
7 changed files with 47 additions and 193 deletions
36
monaco-json/build.js
Normal file
36
monaco-json/build.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* 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 { removeDir, tsc, dts, buildESM, buildAMD } = require('../build/utils');
|
||||
|
||||
removeDir(`monaco-json/release`);
|
||||
removeDir(`monaco-json/out`);
|
||||
|
||||
tsc(`monaco-json/src/tsconfig.json`);
|
||||
|
||||
dts(
|
||||
`monaco-json/out/amd/monaco.contribution.d.ts`,
|
||||
`monaco-json/monaco.d.ts`,
|
||||
'monaco.languages.json'
|
||||
);
|
||||
|
||||
buildESM({
|
||||
entryPoints: ['src/monaco.contribution.ts', 'src/jsonMode.ts', 'src/json.worker.ts'],
|
||||
external: ['monaco-editor-core', '*/jsonMode'],
|
||||
});
|
||||
buildAMD({
|
||||
entryPoint: 'src/monaco.contribution.ts',
|
||||
banner: 'define("vs/language/json/monaco.contribution",["vs/editor/editor.api"],()=>{'
|
||||
});
|
||||
buildAMD({
|
||||
entryPoint: 'src/jsonMode.ts',
|
||||
banner: 'define("vs/language/json/jsonMode",["vs/editor/editor.api"],()=>{'
|
||||
});
|
||||
buildAMD({
|
||||
entryPoint: 'src/jsonWorker.ts',
|
||||
banner: 'define("vs/language/json/jsonWorker",[],()=>{'
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue