mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-05-19 04:08:48 +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,
|
||||
paths: {
|
||||
'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',
|
||||
packages: [
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ import {
|
|||
Position,
|
||||
Range,
|
||||
Uri,
|
||||
} from 'monaco-editor';
|
||||
} from 'monaco-editor/esm/vs/editor/editor.api';
|
||||
import { CustomFormatterOptions } from 'yaml-language-server';
|
||||
|
||||
export type WorkerAccessor = (...more: Uri[]) => PromiseLike<YAMLWorker>;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'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';
|
||||
|
||||
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.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
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 {
|
||||
export interface DiagnosticsOptions {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'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 { YAMLWorker } from './yamlWorker';
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'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 { LanguageServiceDefaultsImpl } from './monaco.contribution';
|
||||
import { WorkerManager } from './workerManager';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
*--------------------------------------------------------------------------------------------*/
|
||||
'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 yamlService from 'yaml-language-server';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue