mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Restructures out and release folders.
out/amd -> out/languages/amd-tsc out/release -> out/languages/bundled release -> out/monaco-editor
This commit is contained in:
parent
fb0d6bada1
commit
5ccfdf7c02
33 changed files with 131 additions and 199 deletions
|
|
@ -16,7 +16,7 @@ export const REPO_ROOT = path.join(__dirname, '../');
|
|||
/**
|
||||
* Launch the typescript compiler synchronously over a project.
|
||||
*/
|
||||
export function tsc(_projectPath: string) {
|
||||
export function runTsc(_projectPath: string) {
|
||||
const projectPath = path.join(REPO_ROOT, _projectPath);
|
||||
console.log(`Launching compiler at ${_projectPath}...`);
|
||||
const res = cp.spawnSync(
|
||||
|
|
@ -47,12 +47,12 @@ export function prettier(_filePath: string) {
|
|||
/**
|
||||
* Transform an external .d.ts file to an internal .d.ts file
|
||||
*/
|
||||
export function dts(_source: string, _destination: string, namespace: string) {
|
||||
const source = path.join(REPO_ROOT, _source);
|
||||
const destination = path.join(REPO_ROOT, _destination);
|
||||
export function massageAndCopyDts(source: string, destination: string, namespace: string) {
|
||||
const absoluteSource = path.join(REPO_ROOT, source);
|
||||
const absoluteDestination = path.join(REPO_ROOT, destination);
|
||||
|
||||
const lines = fs
|
||||
.readFileSync(source)
|
||||
.readFileSync(absoluteSource)
|
||||
.toString()
|
||||
.split(/\r\n|\r|\n/);
|
||||
|
||||
|
|
@ -81,10 +81,10 @@ export function dts(_source: string, _destination: string, namespace: string) {
|
|||
result.push(`}`);
|
||||
result.push(``);
|
||||
|
||||
ensureDir(path.dirname(destination));
|
||||
fs.writeFileSync(destination, result.join('\n'));
|
||||
ensureDir(path.dirname(absoluteDestination));
|
||||
fs.writeFileSync(absoluteDestination, result.join('\n'));
|
||||
|
||||
prettier(_destination);
|
||||
prettier(destination);
|
||||
}
|
||||
|
||||
export function build(options: import('esbuild').BuildOptions) {
|
||||
|
|
@ -113,7 +113,7 @@ export function buildESM(options: { base: string; entryPoints: string[]; externa
|
|||
},
|
||||
external: options.external,
|
||||
outbase: `src/${options.base}`,
|
||||
outdir: `out/release/esm/vs/${options.base}/`,
|
||||
outdir: `out/languages/bundled/esm/vs/${options.base}/`,
|
||||
plugins: [
|
||||
alias({
|
||||
'vscode-nls': path.join(__dirname, 'fillers/vscode-nls.ts')
|
||||
|
|
@ -156,7 +156,7 @@ function buildOneAMD(
|
|||
js: 'return moduleExports;\n});'
|
||||
},
|
||||
outbase: `src/${options.base}`,
|
||||
outdir: `out/release/${type}/vs/${options.base}/`,
|
||||
outdir: `out/languages/bundled/amd-${type}/vs/${options.base}/`,
|
||||
plugins: [
|
||||
alias({
|
||||
'vscode-nls': path.join(__dirname, '../build/fillers/vscode-nls.ts'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue