From a8df4018f1a885e70505169b0ea97f0c7fb880d3 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 13 Nov 2021 19:40:20 +0100 Subject: [PATCH] Move html sources into `/src/` --- .github/workflows/ci.yml | 2 +- .prettierignore | 2 - .vscode/launch.json | 36 ++-- build/build.js | 33 +++- build/utils.js | 10 +- monaco-editor/metadata.js | 8 +- monaco-editor/typedoc/monaco.d.ts | 9 +- .../website/playground/monaco.d.ts.txt | 9 +- monaco-html/build.js | 41 ----- monaco-html/monaco.d.ts | 172 ------------------ monaco-html/src/fillers/monaco-editor-core.ts | 6 - monaco-html/src/tsconfig.json | 10 - monaco-json/monaco.d.ts | 2 - .../src/fillers/monaco-editor-core-amd.ts | 24 +-- monaco-typescript/importTypescript.js | 2 +- monaco-typescript/monaco.d.ts | 2 - package.json | 6 +- {monaco-html/src => src/html}/html.worker.ts | 0 {monaco-html/src => src/html}/htmlMode.ts | 2 +- {monaco-html/src => src/html}/htmlWorker.ts | 2 +- .../src => src/html}/languageFeatures.ts | 2 +- .../src => src/html}/monaco.contribution.ts | 2 +- .../src => src/html}/workerManager.ts | 2 +- 23 files changed, 80 insertions(+), 304 deletions(-) delete mode 100644 monaco-html/build.js delete mode 100644 monaco-html/monaco.d.ts delete mode 100644 monaco-html/src/fillers/monaco-editor-core.ts delete mode 100644 monaco-html/src/tsconfig.json rename {monaco-html/src => src/html}/html.worker.ts (100%) rename {monaco-html/src => src/html}/htmlMode.ts (98%) rename {monaco-html/src => src/html}/htmlWorker.ts (98%) rename {monaco-html/src => src/html}/languageFeatures.ts (99%) rename {monaco-html/src => src/html}/monaco.contribution.ts (99%) rename {monaco-html/src => src/html}/workerManager.ts (97%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21f9b530..3bf6c73a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: id: cacheNodeModules uses: actions/cache@v2 with: - path: "**/node_modules" + path: '**/node_modules' key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('**/package-lock.json') }} restore-keys: ${{ runner.os }}-cacheNodeModules- diff --git a/.prettierignore b/.prettierignore index d8a19f85..670c09cc 100644 --- a/.prettierignore +++ b/.prettierignore @@ -11,8 +11,6 @@ /monaco-editor/typedoc/theme/ /monaco-editor/typedoc/monaco.d.ts /monaco-editor/website/lib/ -/monaco-html/out/ -/monaco-html/release/ /monaco-editor-webpack-plugin/test/dist/*.js /monaco-json/out/ /monaco-json/release/ diff --git a/.vscode/launch.json b/.vscode/launch.json index 05c913fb..b2bf1763 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,20 +1,16 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "pwa-node", - "request": "launch", - "name": "Monaco Languages Unit Tests", - "skipFiles": [ - "/**" - ], - "program": "${workspaceFolder}\\monaco-languages\\test\\all.js", - "outFiles": [ - "${workspaceFolder}/**/*.js" - ] - } - ] -} +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-node", + "request": "launch", + "name": "Monaco Languages Unit Tests", + "skipFiles": ["/**"], + "program": "${workspaceFolder}\\monaco-languages\\test\\all.js", + "outFiles": ["${workspaceFolder}/**/*.js"] + } + ] +} diff --git a/build/build.js b/build/build.js index 4d47937d..45d0f415 100644 --- a/build/build.js +++ b/build/build.js @@ -11,10 +11,11 @@ removeDir(`out`); tsc(`src/tsconfig.json`); +dts(`out/amd/css/monaco.contribution.d.ts`, `out/release/css/monaco.d.ts`, 'monaco.languages.css'); dts( - `out/amd/css/monaco.contribution.d.ts`, - `out/release/css/monaco.d.ts`, - 'monaco.languages.css' + `out/amd/html/monaco.contribution.d.ts`, + `out/release/html/monaco.d.ts`, + 'monaco.languages.html' ); buildESM2({ @@ -38,3 +39,29 @@ buildAMD2({ entryPoint: 'src/css/cssWorker.ts', amdModuleId: 'vs/language/css/cssWorker' }); + +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' +}); diff --git a/build/utils.js b/build/utils.js index cb1da279..83290843 100644 --- a/build/utils.js +++ b/build/utils.js @@ -186,7 +186,7 @@ exports.build = build; */ function buildESM(options) { build({ - entryPoints: options.entryPoints.map(e => (`${options.base}/${e}`)), + entryPoints: options.entryPoints.map((e) => `${options.base}/${e}`), bundle: true, target: 'esnext', format: 'esm', @@ -260,7 +260,9 @@ function buildOneAMD(type, options) { }, globalName: 'moduleExports', banner: { - js: `${bundledFileHeader}define("${options.amdModuleId}",[${(options.amdDependencies || []).map(dep => (`"${dep}"`)).join(',')}],()=>{` + js: `${bundledFileHeader}define("${options.amdModuleId}",[${(options.amdDependencies || []) + .map((dep) => `"${dep}"`) + .join(',')}],()=>{` }, footer: { js: 'return moduleExports;\n});' @@ -315,7 +317,9 @@ function buildOneAMD2(type, options) { }, globalName: 'moduleExports', banner: { - js: `${bundledFileHeader}define("${options.amdModuleId}",[${(options.amdDependencies || []).map(dep => (`"${dep}"`)).join(',')}],()=>{` + js: `${bundledFileHeader}define("${options.amdModuleId}",[${(options.amdDependencies || []) + .map((dep) => `"${dep}"`) + .join(',')}],()=>{` }, footer: { js: 'return moduleExports;\n});' diff --git a/monaco-editor/metadata.js b/monaco-editor/metadata.js index 06075d18..7d971078 100644 --- a/monaco-editor/metadata.js +++ b/monaco-editor/metadata.js @@ -51,12 +51,12 @@ name: 'monaco-html', contrib: 'vs/language/html/monaco.contribution', modulePrefix: 'vs/language/html', - rootPath: './monaco-html', + rootPath: './out/release/html', paths: { // use ./ to indicate it is relative to the `rootPath` - dev: './release/dev', - min: './release/min', - esm: './release/esm' + dev: './dev', + min: './min', + esm: './esm' } }, { diff --git a/monaco-editor/typedoc/monaco.d.ts b/monaco-editor/typedoc/monaco.d.ts index c6b2a23d..73d54aad 100644 --- a/monaco-editor/typedoc/monaco.d.ts +++ b/monaco-editor/typedoc/monaco.d.ts @@ -6910,7 +6910,6 @@ declare namespace monaco.worker { * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - declare namespace monaco.languages.typescript { export enum ModuleKind { None = 0, @@ -7522,7 +7521,6 @@ declare namespace monaco.languages.css { * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - declare namespace monaco.languages.json { export interface DiagnosticsOptions { /** @@ -7635,7 +7633,6 @@ declare namespace monaco.languages.json { * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - declare namespace monaco.languages.html { export interface HTMLFormatConfiguration { readonly tabSize: number; @@ -7742,11 +7739,7 @@ declare namespace monaco.languages.html { * Use this method to register additional language ids with a HTML service. * The language server has to be registered before an editor model is opened. */ - export function registerHTMLLanguageService( - languageId: string, - options?: Options, - modeConfiguration?: ModeConfiguration - ): LanguageServiceRegistration; + export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration; export interface HTMLDataConfiguration { /** * Defines whether the standard HTML tags and attributes are shown diff --git a/monaco-editor/website/playground/monaco.d.ts.txt b/monaco-editor/website/playground/monaco.d.ts.txt index c6b2a23d..73d54aad 100644 --- a/monaco-editor/website/playground/monaco.d.ts.txt +++ b/monaco-editor/website/playground/monaco.d.ts.txt @@ -6910,7 +6910,6 @@ declare namespace monaco.worker { * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - declare namespace monaco.languages.typescript { export enum ModuleKind { None = 0, @@ -7522,7 +7521,6 @@ declare namespace monaco.languages.css { * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - declare namespace monaco.languages.json { export interface DiagnosticsOptions { /** @@ -7635,7 +7633,6 @@ declare namespace monaco.languages.json { * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ - declare namespace monaco.languages.html { export interface HTMLFormatConfiguration { readonly tabSize: number; @@ -7742,11 +7739,7 @@ declare namespace monaco.languages.html { * Use this method to register additional language ids with a HTML service. * The language server has to be registered before an editor model is opened. */ - export function registerHTMLLanguageService( - languageId: string, - options?: Options, - modeConfiguration?: ModeConfiguration - ): LanguageServiceRegistration; + export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration; export interface HTMLDataConfiguration { /** * Defines whether the standard HTML tags and attributes are shown diff --git a/monaco-html/build.js b/monaco-html/build.js deleted file mode 100644 index fd26f660..00000000 --- a/monaco-html/build.js +++ /dev/null @@ -1,41 +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 { removeDir, tsc, dts, buildESM, buildAMD } = require('../build/utils'); - -removeDir(`monaco-html/release`); -removeDir(`monaco-html/out`); - -tsc(`monaco-html/src/tsconfig.json`); - -dts( - `monaco-html/out/amd/monaco.contribution.d.ts`, - `monaco-html/monaco.d.ts`, - 'monaco.languages.html' -); - -buildESM({ - base: 'monaco-html', - entryPoints: ['src/monaco.contribution.ts', 'src/htmlMode.ts', 'src/html.worker.ts'], - external: ['monaco-editor-core', '*/htmlMode'] -}); -buildAMD({ - base: 'monaco-html', - entryPoint: 'src/monaco.contribution.ts', - amdModuleId: 'vs/language/html/monaco.contribution', - amdDependencies: ['vs/editor/editor.api'] -}); -buildAMD({ - base: 'monaco-html', - entryPoint: 'src/htmlMode.ts', - amdModuleId: 'vs/language/html/htmlMode' -}); -buildAMD({ - base: 'monaco-html', - entryPoint: 'src/htmlWorker.ts', - amdModuleId: 'vs/language/html/htmlWorker' -}); diff --git a/monaco-html/monaco.d.ts b/monaco-html/monaco.d.ts deleted file mode 100644 index 9e8d1f41..00000000 --- a/monaco-html/monaco.d.ts +++ /dev/null @@ -1,172 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -/// - -declare namespace monaco.languages.html { - export interface HTMLFormatConfiguration { - readonly tabSize: number; - readonly insertSpaces: boolean; - readonly wrapLineLength: number; - readonly unformatted: string; - readonly contentUnformatted: string; - readonly indentInnerHtml: boolean; - readonly preserveNewLines: boolean; - readonly maxPreserveNewLines: number; - readonly indentHandlebars: boolean; - readonly endWithNewline: boolean; - readonly extraLiners: string; - readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline'; - } - export interface CompletionConfiguration { - readonly [providerId: string]: boolean; - } - export interface Options { - /** - * If set, comments are tolerated. If set to false, syntax errors will be emitted for comments. - */ - readonly format?: HTMLFormatConfiguration; - /** - * A list of known schemas and/or associations of schemas to file names. - */ - readonly suggest?: CompletionConfiguration; - /** - * Configures the HTML data types known by the HTML langauge service. - */ - readonly data?: HTMLDataConfiguration; - } - export interface ModeConfiguration { - /** - * Defines whether the built-in completionItemProvider is enabled. - */ - readonly completionItems?: boolean; - /** - * Defines whether the built-in hoverProvider is enabled. - */ - readonly hovers?: boolean; - /** - * Defines whether the built-in documentSymbolProvider is enabled. - */ - readonly documentSymbols?: boolean; - /** - * Defines whether the built-in definitions provider is enabled. - */ - readonly links?: boolean; - /** - * Defines whether the built-in references provider is enabled. - */ - readonly documentHighlights?: boolean; - /** - * Defines whether the built-in rename provider is enabled. - */ - readonly rename?: boolean; - /** - * Defines whether the built-in color provider is enabled. - */ - readonly colors?: boolean; - /** - * Defines whether the built-in foldingRange provider is enabled. - */ - readonly foldingRanges?: boolean; - /** - * Defines whether the built-in diagnostic provider is enabled. - */ - readonly diagnostics?: boolean; - /** - * Defines whether the built-in selection range provider is enabled. - */ - readonly selectionRanges?: boolean; - /** - * Defines whether the built-in documentFormattingEdit provider is enabled. - */ - readonly documentFormattingEdits?: boolean; - /** - * Defines whether the built-in documentRangeFormattingEdit provider is enabled. - */ - readonly documentRangeFormattingEdits?: boolean; - } - export interface LanguageServiceDefaults { - readonly languageId: string; - readonly modeConfiguration: ModeConfiguration; - readonly onDidChange: IEvent; - readonly options: Options; - setOptions(options: Options): void; - setModeConfiguration(modeConfiguration: ModeConfiguration): void; - } - export const htmlLanguageService: LanguageServiceRegistration; - export const htmlDefaults: LanguageServiceDefaults; - export const handlebarLanguageService: LanguageServiceRegistration; - export const handlebarDefaults: LanguageServiceDefaults; - export const razorLanguageService: LanguageServiceRegistration; - export const razorDefaults: LanguageServiceDefaults; - export interface LanguageServiceRegistration extends IDisposable { - readonly defaults: LanguageServiceDefaults; - } - /** - * Registers a new HTML language service for the languageId. - * Note: 'html', 'handlebar' and 'razor' are registered by default. - * - * Use this method to register additional language ids with a HTML service. - * The language server has to be registered before an editor model is opened. - */ - export function registerHTMLLanguageService( - languageId: string, - options?: Options, - modeConfiguration?: ModeConfiguration - ): LanguageServiceRegistration; - export interface HTMLDataConfiguration { - /** - * Defines whether the standard HTML tags and attributes are shown - */ - readonly useDefaultDataProvider?: boolean; - /** - * Provides a set of custom data providers. - */ - readonly dataProviders?: { - [providerId: string]: HTMLDataV1; - }; - } - /** - * Custom HTML tags attributes and attribute values - * https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md - */ - export interface HTMLDataV1 { - readonly version: 1 | 1.1; - readonly tags?: ITagData[]; - readonly globalAttributes?: IAttributeData[]; - readonly valueSets?: IValueSet[]; - } - export interface IReference { - readonly name: string; - readonly url: string; - } - export interface ITagData { - readonly name: string; - readonly description?: string | MarkupContent; - readonly attributes: IAttributeData[]; - readonly references?: IReference[]; - } - export interface IAttributeData { - readonly name: string; - readonly description?: string | MarkupContent; - readonly valueSet?: string; - readonly values?: IValueData[]; - readonly references?: IReference[]; - } - export interface IValueData { - readonly name: string; - readonly description?: string | MarkupContent; - readonly references?: IReference[]; - } - export interface IValueSet { - readonly name: string; - readonly values: IValueData[]; - } - export interface MarkupContent { - readonly kind: MarkupKind; - readonly value: string; - } - export type MarkupKind = 'plaintext' | 'markdown'; -} diff --git a/monaco-html/src/fillers/monaco-editor-core.ts b/monaco-html/src/fillers/monaco-editor-core.ts deleted file mode 100644 index cd996aa7..00000000 --- a/monaco-html/src/fillers/monaco-editor-core.ts +++ /dev/null @@ -1,6 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -export * from 'monaco-editor-core'; diff --git a/monaco-html/src/tsconfig.json b/monaco-html/src/tsconfig.json deleted file mode 100644 index 707f714d..00000000 --- a/monaco-html/src/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "compilerOptions": { - "module": "amd", - "moduleResolution": "node", - "outDir": "../out/amd", - "declaration": true, - "target": "es5", - "lib": ["dom", "es5", "es2015.collection", "es2015.promise", "es2015.iterable"] - } -} diff --git a/monaco-json/monaco.d.ts b/monaco-json/monaco.d.ts index 3198bd71..ca459ec6 100644 --- a/monaco-json/monaco.d.ts +++ b/monaco-json/monaco.d.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/// - declare namespace monaco.languages.json { export interface DiagnosticsOptions { /** diff --git a/monaco-languages/src/fillers/monaco-editor-core-amd.ts b/monaco-languages/src/fillers/monaco-editor-core-amd.ts index 6e27a8fb..0e8a7e3f 100644 --- a/monaco-languages/src/fillers/monaco-editor-core-amd.ts +++ b/monaco-languages/src/fillers/monaco-editor-core-amd.ts @@ -1,12 +1,12 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -// Resolves with the global monaco API - -declare var define: any; - -define([], function () { - return (self).monaco; -}); +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +// Resolves with the global monaco API + +declare var define: any; + +define([], function () { + return (self).monaco; +}); diff --git a/monaco-typescript/importTypescript.js b/monaco-typescript/importTypescript.js index 173735c1..039007c4 100644 --- a/monaco-typescript/importTypescript.js +++ b/monaco-typescript/importTypescript.js @@ -116,7 +116,7 @@ define("vs/language/typescript/lib/typescriptServices", [], function() { return // ╵ ~~~~ // - tsServices = tsServices.replace(/\nvar ([^ ]+) = \(this && this\.([^)]+)\) \|\|/gm, '\nvar $1 =') + tsServices = tsServices.replace(/\nvar ([^ ]+) = \(this && this\.([^)]+)\) \|\|/gm, '\nvar $1 ='); const tsServices_esm = generatedNote + diff --git a/monaco-typescript/monaco.d.ts b/monaco-typescript/monaco.d.ts index 5f817536..74a21a47 100644 --- a/monaco-typescript/monaco.d.ts +++ b/monaco-typescript/monaco.d.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/// - declare namespace monaco.languages.typescript { export enum ModuleKind { None = 0, diff --git a/package.json b/package.json index f14efb08..8269dca6 100644 --- a/package.json +++ b/package.json @@ -9,17 +9,15 @@ "simpleserver": "gulp simpleserver", "import-typescript": "node ./monaco-typescript/importTypescript", "watch-src": "tsc -w -p ./src", - "watch-html": "tsc -w -p ./monaco-html/src", "watch-json": "tsc -w -p ./monaco-json/src", "watch-languages": "tsc -w -p ./monaco-languages/src", "watch-typescript": "tsc -w -p ./monaco-typescript/src", - "watch": "npm-run-all -lp watch-src watch-html watch-json watch-languages watch-typescript", + "watch": "npm-run-all -lp watch-src watch-json watch-languages watch-typescript", "release-src": "node ./build/build", - "release-html": "node ./monaco-html/build", "release-json": "node ./monaco-json/build", "release-languages": "node ./monaco-languages/build", "release-typescript": "node ./monaco-typescript/build", - "release-plugins": "npm-run-all -lp release-src release-html release-json release-languages release-typescript", + "release-plugins": "npm-run-all -lp release-src release-json release-languages release-typescript", "test": "node ./monaco-languages/test/all.js", "gulp-release": "gulp release", "release": "npm-run-all -ls release-plugins gulp-release", diff --git a/monaco-html/src/html.worker.ts b/src/html/html.worker.ts similarity index 100% rename from monaco-html/src/html.worker.ts rename to src/html/html.worker.ts diff --git a/monaco-html/src/htmlMode.ts b/src/html/htmlMode.ts similarity index 98% rename from monaco-html/src/htmlMode.ts rename to src/html/htmlMode.ts index 95b560cb..47647a3a 100644 --- a/monaco-html/src/htmlMode.ts +++ b/src/html/htmlMode.ts @@ -7,7 +7,7 @@ import { WorkerManager } from './workerManager'; import type { HTMLWorker } from './htmlWorker'; import { LanguageServiceDefaults } from './monaco.contribution'; import * as languageFeatures from './languageFeatures'; -import { Uri, IDisposable, languages } from './fillers/monaco-editor-core'; +import { Uri, IDisposable, languages } from '../fillers/monaco-editor-core'; export function setupMode1(defaults: LanguageServiceDefaults): void { const client = new WorkerManager(defaults); diff --git a/monaco-html/src/htmlWorker.ts b/src/html/htmlWorker.ts similarity index 98% rename from monaco-html/src/htmlWorker.ts rename to src/html/htmlWorker.ts index cf5cb6e5..71bc937e 100644 --- a/monaco-html/src/htmlWorker.ts +++ b/src/html/htmlWorker.ts @@ -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'; diff --git a/monaco-html/src/languageFeatures.ts b/src/html/languageFeatures.ts similarity index 99% rename from monaco-html/src/languageFeatures.ts rename to src/html/languageFeatures.ts index 2d6ec034..5e1caa68 100644 --- a/monaco-html/src/languageFeatures.ts +++ b/src/html/languageFeatures.ts @@ -13,7 +13,7 @@ import { Range, CancellationToken, IMarkdownString -} from './fillers/monaco-editor-core'; +} from '../fillers/monaco-editor-core'; export interface WorkerAccessor { (...more: Uri[]): Promise; diff --git a/monaco-html/src/monaco.contribution.ts b/src/html/monaco.contribution.ts similarity index 99% rename from monaco-html/src/monaco.contribution.ts rename to src/html/monaco.contribution.ts index e3320f08..30a24b2a 100644 --- a/monaco-html/src/monaco.contribution.ts +++ b/src/html/monaco.contribution.ts @@ -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; diff --git a/monaco-html/src/workerManager.ts b/src/html/workerManager.ts similarity index 97% rename from monaco-html/src/workerManager.ts rename to src/html/workerManager.ts index 5122168b..74094e78 100644 --- a/monaco-html/src/workerManager.ts +++ b/src/html/workerManager.ts @@ -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