You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
2.2 KiB
53 lines
2.2 KiB
/*--------------------------------------------------------------------------------------------- |
|
* Copyright (c) Microsoft Corporation. All rights reserved. |
|
* Licensed under the MIT License. See License.txt in the project root for license information. |
|
*--------------------------------------------------------------------------------------------*/ |
|
'use strict'; |
|
import { createMonacoBaseAPI } from './common/standalone/standaloneBase.js'; |
|
import { createMonacoEditorAPI } from './standalone/browser/standaloneEditor.js'; |
|
import { createMonacoLanguagesAPI } from './standalone/browser/standaloneLanguages.js'; |
|
import { EDITOR_DEFAULTS, WrappingIndent } from './common/config/editorOptions.js'; |
|
import { PolyfillPromise } from '../base/common/winjs.polyfill.promise.js'; |
|
var global = self; |
|
// When missing, polyfill the native promise |
|
// with our winjs-based polyfill |
|
if (typeof global.Promise === 'undefined') { |
|
global.Promise = PolyfillPromise; |
|
} |
|
// Set defaults for standalone editor |
|
EDITOR_DEFAULTS.wrappingIndent = WrappingIndent.None; |
|
EDITOR_DEFAULTS.viewInfo.glyphMargin = false; |
|
EDITOR_DEFAULTS.autoIndent = false; |
|
var api = createMonacoBaseAPI(); |
|
api.editor = createMonacoEditorAPI(); |
|
api.languages = createMonacoLanguagesAPI(); |
|
export var CancellationTokenSource = api.CancellationTokenSource; |
|
export var Emitter = api.Emitter; |
|
export var KeyCode = api.KeyCode; |
|
export var KeyMod = api.KeyMod; |
|
export var Position = api.Position; |
|
export var Range = api.Range; |
|
export var Selection = api.Selection; |
|
export var SelectionDirection = api.SelectionDirection; |
|
export var Severity = api.Severity; |
|
export var MarkerSeverity = api.MarkerSeverity; |
|
export var Promise = api.Promise; |
|
export var Uri = api.Uri; |
|
export var Token = api.Token; |
|
export var editor = api.editor; |
|
export var languages = api.languages; |
|
global.monaco = api; |
|
if (typeof global.require !== 'undefined' && typeof global.require.config === 'function') { |
|
global.require.config({ |
|
ignoreDuplicateModules: [ |
|
'vscode-languageserver-types', |
|
'vscode-languageserver-types/main', |
|
'vscode-nls', |
|
'vscode-nls/vscode-nls', |
|
'jsonc-parser', |
|
'jsonc-parser/main', |
|
'vscode-uri', |
|
'vscode-uri/index' |
|
] |
|
}); |
|
}
|
|
|