Moves src/{typescript,css,...} to src/language/{typescript,css,...} to align with the released paths

pull/2935/head
Henning Dieterichs 3 years ago
parent 9eb7c18143
commit 91edee5791
No known key found for this signature in database
GPG Key ID: 771381EFFDB9EC06

@ -9,7 +9,7 @@
/samples/browser-esm-webpack-small/dist/*.js
/samples/browser-esm-webpack-typescript/dist/*.js
/samples/browser-esm-webpack-typescript-react/dist/*.js
/src/typescript/lib/
/src/language/typescript/lib/
/test/manual/generated/
/website/lib/
/website/typedoc/monaco.d.ts

@ -15,20 +15,24 @@ tsc(`src/tsconfig.json`);
//#region Type Defintion
dts(`out/amd/css/monaco.contribution.d.ts`, `out/release/css/monaco.d.ts`, 'monaco.languages.css');
dts(
`out/amd/html/monaco.contribution.d.ts`,
`out/release/html/monaco.d.ts`,
`out/amd/language/css/monaco.contribution.d.ts`,
`out/release/language/css/monaco.d.ts`,
'monaco.languages.css'
);
dts(
`out/amd/language/html/monaco.contribution.d.ts`,
`out/release/language/html/monaco.d.ts`,
'monaco.languages.html'
);
dts(
`out/amd/json/monaco.contribution.d.ts`,
`out/release/json/monaco.d.ts`,
`out/amd/language/json/monaco.contribution.d.ts`,
`out/release/language/json/monaco.d.ts`,
'monaco.languages.json'
);
dts(
`out/amd/typescript/monaco.contribution.d.ts`,
`out/release/typescript/monaco.d.ts`,
`out/amd/language/typescript/monaco.contribution.d.ts`,
`out/release/language/typescript/monaco.d.ts`,
'monaco.languages.typescript'
);
@ -37,24 +41,28 @@ dts(
//#region css
buildESM({
base: 'css',
entryPoints: ['src/css/monaco.contribution.ts', 'src/css/cssMode.ts', 'src/css/css.worker.ts'],
base: 'language/css',
entryPoints: [
'src/language/css/monaco.contribution.ts',
'src/language/css/cssMode.ts',
'src/language/css/css.worker.ts'
],
external: ['monaco-editor-core', '*/cssMode']
});
buildAMD({
base: 'css',
entryPoint: 'src/css/monaco.contribution.ts',
base: 'language/css',
entryPoint: 'src/language/css/monaco.contribution.ts',
amdModuleId: 'vs/language/css/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'css',
entryPoint: 'src/css/cssMode.ts',
base: 'language/css',
entryPoint: 'src/language/css/cssMode.ts',
amdModuleId: 'vs/language/css/cssMode'
});
buildAMD({
base: 'css',
entryPoint: 'src/css/cssWorker.ts',
base: 'language/css',
entryPoint: 'src/language/css/cssWorker.ts',
amdModuleId: 'vs/language/css/cssWorker'
});
@ -63,28 +71,28 @@ buildAMD({
//#region html
buildESM({
base: 'html',
base: 'language/html',
entryPoints: [
'src/html/monaco.contribution.ts',
'src/html/htmlMode.ts',
'src/html/html.worker.ts'
'src/language/html/monaco.contribution.ts',
'src/language/html/htmlMode.ts',
'src/language/html/html.worker.ts'
],
external: ['monaco-editor-core', '*/htmlMode']
});
buildAMD({
base: 'html',
entryPoint: 'src/html/monaco.contribution.ts',
base: 'language/html',
entryPoint: 'src/language/html/monaco.contribution.ts',
amdModuleId: 'vs/language/html/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'html',
entryPoint: 'src/html/htmlMode.ts',
base: 'language/html',
entryPoint: 'src/language/html/htmlMode.ts',
amdModuleId: 'vs/language/html/htmlMode'
});
buildAMD({
base: 'html',
entryPoint: 'src/html/htmlWorker.ts',
base: 'language/html',
entryPoint: 'src/language/html/htmlWorker.ts',
amdModuleId: 'vs/language/html/htmlWorker'
});
@ -93,28 +101,28 @@ buildAMD({
//#region json
buildESM({
base: 'json',
base: 'language/json',
entryPoints: [
'src/json/monaco.contribution.ts',
'src/json/jsonMode.ts',
'src/json/json.worker.ts'
'src/language/json/monaco.contribution.ts',
'src/language/json/jsonMode.ts',
'src/language/json/json.worker.ts'
],
external: ['monaco-editor-core', '*/jsonMode']
});
buildAMD({
base: 'json',
entryPoint: 'src/json/monaco.contribution.ts',
base: 'language/json',
entryPoint: 'src/language/json/monaco.contribution.ts',
amdModuleId: 'vs/language/json/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'json',
entryPoint: 'src/json/jsonMode.ts',
base: 'language/json',
entryPoint: 'src/language/json/jsonMode.ts',
amdModuleId: 'vs/language/json/jsonMode'
});
buildAMD({
base: 'json',
entryPoint: 'src/json/jsonWorker.ts',
base: 'language/json',
entryPoint: 'src/language/json/jsonWorker.ts',
amdModuleId: 'vs/language/json/jsonWorker'
});
@ -123,33 +131,33 @@ buildAMD({
//#region typescript
copyFile(
`src/typescript/lib/typescriptServices-amd.js`,
`out/amd/typescript/lib/typescriptServices.js`
`src/language/typescript/lib/typescriptServices-amd.js`,
`out/amd/language/typescript/lib/typescriptServices.js`
);
buildESM({
base: 'typescript',
base: 'language/typescript',
entryPoints: [
'src/typescript/monaco.contribution.ts',
'src/typescript/tsMode.ts',
'src/typescript/ts.worker.ts'
'src/language/typescript/monaco.contribution.ts',
'src/language/typescript/tsMode.ts',
'src/language/typescript/ts.worker.ts'
],
external: ['monaco-editor-core', '*/tsMode']
});
buildAMD({
base: 'typescript',
entryPoint: 'src/typescript/monaco.contribution.ts',
base: 'language/typescript',
entryPoint: 'src/language/typescript/monaco.contribution.ts',
amdModuleId: 'vs/language/typescript/monaco.contribution',
amdDependencies: ['vs/editor/editor.api']
});
buildAMD({
base: 'typescript',
entryPoint: 'src/typescript/tsMode.ts',
base: 'language/typescript',
entryPoint: 'src/language/typescript/tsMode.ts',
amdModuleId: 'vs/language/typescript/tsMode'
});
buildAMD({
base: 'typescript',
entryPoint: 'src/typescript/tsWorker.ts',
base: 'language/typescript',
entryPoint: 'src/language/typescript/tsWorker.ts',
amdModuleId: 'vs/language/typescript/tsWorker'
});

@ -16,7 +16,7 @@ const generatedNote = `//
`;
const TYPESCRIPT_LIB_SOURCE = path.join(REPO_ROOT, 'node_modules/typescript/lib');
const TYPESCRIPT_LIB_DESTINATION = path.join(REPO_ROOT, 'src/typescript/lib');
const TYPESCRIPT_LIB_DESTINATION = path.join(REPO_ROOT, 'src/language/typescript/lib');
(function () {
try {

@ -15,10 +15,10 @@
name: 'monaco-typescript',
contrib: 'vs/language/typescript/monaco.contribution',
modulePrefix: 'vs/language/typescript',
rootPath: './out/release/typescript',
rootPath: './out/release/language/typescript',
paths: {
// use ./ to indicate it is relative to the `rootPath`
src: './../../amd/typescript',
src: './../../../amd/language/typescript',
dev: './dev',
min: './min',
esm: './esm'
@ -28,10 +28,10 @@
name: 'monaco-css',
contrib: 'vs/language/css/monaco.contribution',
modulePrefix: 'vs/language/css',
rootPath: './out/release/css',
rootPath: './out/release/language/css',
paths: {
// use ./ to indicate it is relative to the `rootPath`
src: './../../amd/css',
src: './../../../amd/language/css',
dev: './dev',
min: './min',
esm: './esm'
@ -41,10 +41,10 @@
name: 'monaco-json',
contrib: 'vs/language/json/monaco.contribution',
modulePrefix: 'vs/language/json',
rootPath: './out/release/json',
rootPath: './out/release/language/json',
paths: {
// use ./ to indicate it is relative to the `rootPath`
src: './../../amd/json',
src: './../../../amd/language/json',
dev: './dev',
min: './min',
esm: './esm'
@ -54,10 +54,10 @@
name: 'monaco-html',
contrib: 'vs/language/html/monaco.contribution',
modulePrefix: 'vs/language/html',
rootPath: './out/release/html',
rootPath: './out/release/language/html',
paths: {
// use ./ to indicate it is relative to the `rootPath`
src: './../../amd/html',
src: './../../../amd/language/html',
dev: './dev',
min: './min',
esm: './esm'

@ -16,7 +16,7 @@ import {
IDisposable,
MarkerSeverity,
IEvent
} from '../fillers/monaco-editor-core';
} from '../../fillers/monaco-editor-core';
export interface WorkerAccessor<T> {
(...more: Uri[]): Promise<T>;

@ -7,7 +7,7 @@ import { WorkerManager } from './workerManager';
import type { CSSWorker } from './cssWorker';
import { LanguageServiceDefaults } from './monaco.contribution';
import * as languageFeatures from '../common/lspLanguageFeatures';
import { Uri, IDisposable, languages } from '../fillers/monaco-editor-core';
import { Uri, IDisposable, languages } from '../../fillers/monaco-editor-core';
export function setupMode(defaults: LanguageServiceDefaults): IDisposable {
const disposables: IDisposable[] = [];

@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import type { worker } from '../fillers/monaco-editor-core';
import type { worker } from '../../fillers/monaco-editor-core';
import * as cssService from 'vscode-css-languageservice';
import { Options } from './monaco.contribution';

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as mode from './cssMode';
import { languages, Emitter, IEvent } from '../fillers/monaco-editor-core';
import { languages, Emitter, IEvent } from '../../fillers/monaco-editor-core';
export interface Options {
readonly validate?: boolean;

@ -5,7 +5,7 @@
import { LanguageServiceDefaults } from './monaco.contribution';
import type { CSSWorker } from './cssWorker';
import { editor, IDisposable, Uri } from '../fillers/monaco-editor-core';
import { editor, IDisposable, Uri } from '../../fillers/monaco-editor-core';
const STOP_WHEN_IDLE_FOR = 2 * 60 * 1000; // 2min

@ -7,7 +7,7 @@ import { WorkerManager } from './workerManager';
import type { HTMLWorker } from './htmlWorker';
import { LanguageServiceDefaults } from './monaco.contribution';
import * as languageFeatures from '../common/lspLanguageFeatures';
import { Uri, IDisposable, languages } from '../fillers/monaco-editor-core';
import { Uri, IDisposable, languages } from '../../fillers/monaco-editor-core';
class HTMLCompletionAdapter extends languageFeatures.CompletionAdapter<HTMLWorker> {
constructor(worker: languageFeatures.WorkerAccessor<HTMLWorker>) {

@ -3,7 +3,7 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { worker } from '../fillers/monaco-editor-core';
import { worker } from '../../fillers/monaco-editor-core';
import * as htmlService from 'vscode-html-languageservice';
import type { Options } from './monaco.contribution';
import { IHTMLDataProvider } from 'vscode-html-languageservice';

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as mode from './htmlMode';
import { languages, Emitter, IEvent, IDisposable } from '../fillers/monaco-editor-core';
import { languages, Emitter, IEvent, IDisposable } from '../../fillers/monaco-editor-core';
export interface HTMLFormatConfiguration {
readonly tabSize: number;

@ -5,7 +5,7 @@
import { LanguageServiceDefaults } from './monaco.contribution';
import type { HTMLWorker } from './htmlWorker';
import { Uri, IDisposable, editor } from '../fillers/monaco-editor-core';
import { Uri, IDisposable, editor } from '../../fillers/monaco-editor-core';
const STOP_WHEN_IDLE_FOR = 2 * 60 * 1000; // 2min

@ -8,7 +8,7 @@ import type { JSONWorker } from './jsonWorker';
import { LanguageServiceDefaults } from './monaco.contribution';
import * as languageFeatures from '../common/lspLanguageFeatures';
import { createTokenizationSupport } from './tokenization';
import { Uri, IDisposable, languages, editor } from '../fillers/monaco-editor-core';
import { Uri, IDisposable, languages, editor } from '../../fillers/monaco-editor-core';
class JSONDiagnosticsAdapter extends languageFeatures.DiagnosticsAdapter<JSONWorker> {
constructor(

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as jsonService from 'vscode-json-languageservice';
import type { worker } from '../fillers/monaco-editor-core';
import type { worker } from '../../fillers/monaco-editor-core';
import { URI } from 'vscode-uri';
import { DiagnosticsOptions } from './monaco.contribution';

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as mode from './jsonMode';
import { Emitter, IEvent, languages } from '../fillers/monaco-editor-core';
import { Emitter, IEvent, languages } from '../../fillers/monaco-editor-core';
// --- JSON configuration and defaults ---------

@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/
import * as json from 'jsonc-parser';
import { languages } from '../fillers/monaco-editor-core';
import { languages } from '../../fillers/monaco-editor-core';
export function createTokenizationSupport(supportComments: boolean): languages.TokensProvider {
return {

@ -5,7 +5,7 @@
import { LanguageServiceDefaults } from './monaco.contribution';
import type { JSONWorker } from './jsonWorker';
import { IDisposable, Uri, editor } from '../fillers/monaco-editor-core';
import { IDisposable, Uri, editor } from '../../fillers/monaco-editor-core';
const STOP_WHEN_IDLE_FOR = 2 * 60 * 1000; // 2min

@ -23,7 +23,7 @@ import {
IRange,
MarkerTag,
MarkerSeverity
} from '../fillers/monaco-editor-core';
} from '../../fillers/monaco-editor-core';
//#region utils copied from typescript to prevent loading the entire typescriptServices ---

@ -5,7 +5,7 @@
import type * as mode from './tsMode';
import { typescriptVersion as tsversion } from './lib/typescriptServicesMetadata'; // do not import the whole typescriptServices here
import { languages, Emitter, IEvent, IDisposable, Uri } from '../fillers/monaco-editor-core';
import { languages, Emitter, IEvent, IDisposable, Uri } from '../../fillers/monaco-editor-core';
//#region enums copied from typescript to prevent loading the entire typescriptServices ---

@ -5,7 +5,7 @@
import * as edworker from 'monaco-editor-core/esm/vs/editor/editor.worker';
import { ICreateData, create } from './tsWorker';
import { worker } from '../fillers/monaco-editor-core';
import { worker } from '../../fillers/monaco-editor-core';
self.onmessage = () => {
// ignore the first message

@ -7,7 +7,7 @@ import { WorkerManager } from './workerManager';
import type { TypeScriptWorker } from './tsWorker';
import { LanguageServiceDefaults } from './monaco.contribution';
import * as languageFeatures from './languageFeatures';
import { languages, Uri } from '../fillers/monaco-editor-core';
import { languages, Uri } from '../../fillers/monaco-editor-core';
let javaScriptWorker: (...uris: Uri[]) => Promise<TypeScriptWorker>;
let typeScriptWorker: (...uris: Uri[]) => Promise<TypeScriptWorker>;

@ -11,7 +11,7 @@ import {
IExtraLibs,
TypeScriptWorker as ITypeScriptWorker
} from './monaco.contribution';
import { Uri, worker } from '../fillers/monaco-editor-core';
import { Uri, worker } from '../../fillers/monaco-editor-core';
/**
* Loading a default lib as a source file will mess up TS completely.

@ -5,7 +5,7 @@
import { LanguageServiceDefaults } from './monaco.contribution';
import type { TypeScriptWorker } from './tsWorker';
import { editor, Uri, IDisposable } from '../fillers/monaco-editor-core';
import { editor, Uri, IDisposable } from '../../fillers/monaco-editor-core';
export class WorkerManager {
private _modeId: string;

@ -209,13 +209,9 @@
let loaderPathsConfig = {};
window.AMD = true;
if (IS_FILE_PROTOCOL) {
loaderPathsConfig['vs/language/fillers/monaco-editor-core'] =
DIRNAME + '/../.././out/amd/fillers/monaco-editor-core-amd';
loaderPathsConfig['vs/fillers/monaco-editor-core'] =
DIRNAME + '/../.././out/amd/fillers/monaco-editor-core-amd';
} else {
loaderPathsConfig['vs/language/fillers/monaco-editor-core'] =
PATH_PREFIX + '/monaco-editor/./out/amd/fillers/monaco-editor-core-amd';
loaderPathsConfig['vs/fillers/monaco-editor-core'] =
PATH_PREFIX + '/monaco-editor/./out/amd/fillers/monaco-editor-core-amd';
}

Loading…
Cancel
Save