mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-07-08 20:40:46 +00:00
Use monaco-editor/esm/vs/editor/editor.api
This doesn’t enforce users to pull in all of monaco-editor.
This commit is contained in:
parent
5a0de63544
commit
52c457a196
7 changed files with 21 additions and 8 deletions
|
|
@ -33,7 +33,8 @@ function bundleOne(moduleId, exclude) {
|
||||||
exclude: exclude,
|
exclude: exclude,
|
||||||
paths: {
|
paths: {
|
||||||
'vs/language/yaml': REPO_ROOT + '/out/amd',
|
'vs/language/yaml': REPO_ROOT + '/out/amd',
|
||||||
'monaco-editor': REPO_ROOT + '/out/amd/fillers/monaco-editor-amd',
|
'monaco-editor/esm/vs/editor/editor.api':
|
||||||
|
REPO_ROOT + '/out/amd/fillers/monaco-editor-amd',
|
||||||
},
|
},
|
||||||
optimize: 'none',
|
optimize: 'none',
|
||||||
packages: [
|
packages: [
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import {
|
||||||
Position,
|
Position,
|
||||||
Range,
|
Range,
|
||||||
Uri,
|
Uri,
|
||||||
} from 'monaco-editor';
|
} from 'monaco-editor/esm/vs/editor/editor.api';
|
||||||
import { CustomFormatterOptions } from 'yaml-language-server';
|
import { CustomFormatterOptions } from 'yaml-language-server';
|
||||||
|
|
||||||
export type WorkerAccessor = (...more: Uri[]) => PromiseLike<YAMLWorker>;
|
export type WorkerAccessor = (...more: Uri[]) => PromiseLike<YAMLWorker>;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,11 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { languages, Emitter, IEvent } from 'monaco-editor';
|
import {
|
||||||
|
languages,
|
||||||
|
Emitter,
|
||||||
|
IEvent,
|
||||||
|
} from 'monaco-editor/esm/vs/editor/editor.api';
|
||||||
import { setupMode } from './yamlMode';
|
import { setupMode } from './yamlMode';
|
||||||
|
|
||||||
declare var require: <T>(
|
declare var require: <T>(
|
||||||
|
|
|
||||||
4
src/monaco.d.ts
vendored
4
src/monaco.d.ts
vendored
|
|
@ -3,9 +3,9 @@
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
import { IEvent } from 'monaco-editor';
|
import { IEvent } from 'monaco-editor/esm/vs/editor/editor.api';
|
||||||
|
|
||||||
declare module 'monaco-editor' {
|
declare module 'monaco-editor/esm/vs/editor/editor.api' {
|
||||||
namespace languages.yaml {
|
namespace languages.yaml {
|
||||||
export interface DiagnosticsOptions {
|
export interface DiagnosticsOptions {
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,11 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { editor, Uri, IDisposable } from 'monaco-editor';
|
import {
|
||||||
|
editor,
|
||||||
|
Uri,
|
||||||
|
IDisposable,
|
||||||
|
} from 'monaco-editor/esm/vs/editor/editor.api';
|
||||||
import { LanguageServiceDefaultsImpl } from './monaco.contribution';
|
import { LanguageServiceDefaultsImpl } from './monaco.contribution';
|
||||||
import { YAMLWorker } from './yamlWorker';
|
import { YAMLWorker } from './yamlWorker';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,11 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { languages, Uri, IDisposable } from 'monaco-editor';
|
import {
|
||||||
|
languages,
|
||||||
|
Uri,
|
||||||
|
IDisposable,
|
||||||
|
} from 'monaco-editor/esm/vs/editor/editor.api';
|
||||||
import * as languageFeatures from './languageFeatures';
|
import * as languageFeatures from './languageFeatures';
|
||||||
import { LanguageServiceDefaultsImpl } from './monaco.contribution';
|
import { LanguageServiceDefaultsImpl } from './monaco.contribution';
|
||||||
import { WorkerManager } from './workerManager';
|
import { WorkerManager } from './workerManager';
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { worker } from 'monaco-editor';
|
import { worker } from 'monaco-editor/esm/vs/editor/editor.api';
|
||||||
import * as ls from 'vscode-languageserver-types';
|
import * as ls from 'vscode-languageserver-types';
|
||||||
import * as yamlService from 'yaml-language-server';
|
import * as yamlService from 'yaml-language-server';
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue