monaco-editor/build/build.js

68 lines
1.8 KiB
JavaScript
Raw Normal View History

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
2021-11-12 18:22:26 +08:00
//@ts-check
2021-11-13 07:04:23 +08:00
const { removeDir, tsc, dts, buildESM2, buildAMD2 } = require('../build/utils');
2021-11-13 07:04:23 +08:00
removeDir(`out`);
2021-11-13 07:04:23 +08:00
tsc(`src/tsconfig.json`);
2021-11-14 02:40:20 +08:00
dts(`out/amd/css/monaco.contribution.d.ts`, `out/release/css/monaco.d.ts`, 'monaco.languages.css');
2021-11-12 08:02:23 +08:00
dts(
2021-11-14 02:40:20 +08:00
`out/amd/html/monaco.contribution.d.ts`,
`out/release/html/monaco.d.ts`,
'monaco.languages.html'
2021-11-12 08:02:23 +08:00
);
2021-11-13 07:04:23 +08:00
buildESM2({
base: 'css',
entryPoints: ['src/css/monaco.contribution.ts', 'src/css/cssMode.ts', 'src/css/css.worker.ts'],
2021-11-12 18:31:25 +08:00
external: ['monaco-editor-core', '*/cssMode']
});
2021-11-13 07:04:23 +08:00
buildAMD2({
base: 'css',
entryPoint: 'src/css/monaco.contribution.ts',
2021-11-12 21:39:56 +08:00
amdModuleId: 'vs/language/css/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
2021-11-12 18:31:25 +08:00
});
2021-11-13 07:04:23 +08:00
buildAMD2({
base: 'css',
entryPoint: 'src/css/cssMode.ts',
2021-11-12 21:39:56 +08:00
amdModuleId: 'vs/language/css/cssMode'
2021-11-12 18:31:25 +08:00
});
2021-11-13 07:04:23 +08:00
buildAMD2({
base: 'css',
entryPoint: 'src/css/cssWorker.ts',
2021-11-12 21:39:56 +08:00
amdModuleId: 'vs/language/css/cssWorker'
});
2021-11-14 02:40:20 +08:00
buildESM2({
base: 'html',
entryPoints: [
'src/html/monaco.contribution.ts',
'src/html/htmlMode.ts',
'src/html/html.worker.ts'
],
external: ['monaco-editor-core', '*/htmlMode']
});
buildAMD2({
base: 'html',
entryPoint: 'src/html/monaco.contribution.ts',
amdModuleId: 'vs/language/html/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD2({
base: 'html',
entryPoint: 'src/html/htmlMode.ts',
amdModuleId: 'vs/language/html/htmlMode'
});
buildAMD2({
base: 'html',
entryPoint: 'src/html/htmlWorker.ts',
amdModuleId: 'vs/language/html/htmlWorker'
});