mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
Ship a metadata in the esm folder which can help the webpack plugin
This commit is contained in:
parent
e77825074d
commit
0abbb2be7d
10 changed files with 302 additions and 818 deletions
|
|
@ -59,9 +59,7 @@ Options can be passed in to `MonacoWebpackPlugin`. They can be used to generate
|
|||
- default value: `'[name].worker.js'`.
|
||||
- `publicPath` (`string`) - custom public path for worker scripts, overrides the public path from which files generated by this plugin will be served. This wins out over Webpack's dynamic runtime path and can be useful to avoid attempting to load workers cross-origin when using a CDN for other static resources. Use e.g. '/' if you want to load your resources from the current origin..
|
||||
- default value: `''`.
|
||||
- `languages` (`string[]`) - include only a subset of the languages supported.
|
||||
|
||||
- default value: <!-- LANGUAGES_BEGIN -->`['abap', 'apex', 'azcli', 'bat', 'bicep', 'cameligo', 'clojure', 'coffee', 'cpp', 'csharp', 'csp', 'css', 'dart', 'dockerfile', 'ecl', 'elixir', 'flow9', 'fsharp', 'go', 'graphql', 'handlebars', 'hcl', 'html', 'ini', 'java', 'javascript', 'json', 'julia', 'kotlin', 'less', 'lexon', 'liquid', 'lua', 'm3', 'markdown', 'mips', 'msdax', 'mysql', 'objective-c', 'pascal', 'pascaligo', 'perl', 'pgsql', 'php', 'pla', 'postiats', 'powerquery', 'powershell', 'protobuf', 'pug', 'python', 'qsharp', 'r', 'razor', 'redis', 'redshift', 'restructuredtext', 'ruby', 'rust', 'sb', 'scala', 'scheme', 'scss', 'shell', 'solidity', 'sophia', 'sparql', 'sql', 'st', 'swift', 'systemverilog', 'tcl', 'twig', 'typescript', 'vb', 'xml', 'yaml']`<!-- LANGUAGES_END -->.
|
||||
- `languages` (`string[]`) - include only a subset of the languages supported. By default, all languages shipped with the `monaco-editor` will be included.
|
||||
|
||||
Some languages share the same web worker. If one of the following languages is included, you must also include the language responsible for instantiating their shared worker:
|
||||
|
||||
|
|
@ -71,10 +69,7 @@ Options can be passed in to `MonacoWebpackPlugin`. They can be used to generate
|
|||
| handlebars | html |
|
||||
| scss, less | css |
|
||||
|
||||
- `features` (`string[]`) - include only a subset of the editor features.
|
||||
|
||||
- default value: <!-- FEATURES_BEGIN -->`['accessibilityHelp', 'anchorSelect', 'bracketMatching', 'caretOperations', 'clipboard', 'codeAction', 'codelens', 'colorPicker', 'comment', 'contextmenu', 'coreCommands', 'cursorUndo', 'dnd', 'documentSymbols', 'find', 'folding', 'fontZoom', 'format', 'gotoError', 'gotoLine', 'gotoSymbol', 'hover', 'iPadShowKeyboard', 'inPlaceReplace', 'indentation', 'inlayHints', 'inlineCompletions', 'inspectTokens', 'linesOperations', 'linkedEditing', 'links', 'multicursor', 'parameterHints', 'quickCommand', 'quickHelp', 'quickOutline', 'referenceSearch', 'rename', 'smartSelect', 'snippets', 'suggest', 'toggleHighContrast', 'toggleTabFocusMode', 'transpose', 'unusualLineTerminators', 'viewportSemanticTokens', 'wordHighlighter', 'wordOperations', 'wordPartOperations']`<!-- FEATURES_END -->.
|
||||
- excluded features: It is also possible to exclude certain default features prefixing them with an exclamation mark '!'.
|
||||
- `features` (`string[]`) - include only a subset of the editor features. By default, all features shipped with the `monaco-editor` will be included. Instead of enumerating included features, it is also possible to exclude certain default features prefixing them with an exclamation mark '!'.
|
||||
|
||||
- `globalAPI` (`boolean`) - specify whether the editor API should be exposed through a global `monaco` object or not. This option is applicable to `0.22.0` and newer version of `monaco-editor`. Since `0.22.0`, the ESM version of the monaco editor does no longer define a global `monaco` object unless `global.MonacoEnvironment = { globalAPI: true }` is set ([change log](https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md#0220-29012021)).
|
||||
- default value: `false`.
|
||||
|
|
|
|||
6
webpack-plugin/package-lock.json
generated
6
webpack-plugin/package-lock.json
generated
|
|
@ -767,6 +767,12 @@
|
|||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"dev": true
|
||||
},
|
||||
"monaco-editor": {
|
||||
"version": "0.30.1",
|
||||
"resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.30.1.tgz",
|
||||
"integrity": "sha512-B/y4+b2O5G2gjuxIFtCE2EkM17R2NM7/3F8x0qcPsqy4V83bitJTIO4TIeZpYlzu/xy6INiY/+84BEm6+7Cmzg==",
|
||||
"dev": true
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "3.1.30",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.30.tgz",
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
"css-loader": "^6.5.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"glob": "^7.2.0",
|
||||
"monaco-editor": "^0.30.1",
|
||||
"style-loader": "^3.3.1",
|
||||
"typescript": "^4.4.4",
|
||||
"webpack": "^5.64.1",
|
||||
|
|
|
|||
|
|
@ -1,309 +0,0 @@
|
|||
//
|
||||
// THIS IS A GENERATED FILE. PLEASE DO NOT EDIT DIRECTLY.
|
||||
// GENERATED USING node scripts/import-editor.js
|
||||
//
|
||||
import { IFeatureDefinition } from './types';
|
||||
|
||||
export const featuresArr: IFeatureDefinition[] = [
|
||||
{
|
||||
label: 'accessibilityHelp',
|
||||
entry: 'vs/editor/standalone/browser/accessibilityHelp/accessibilityHelp'
|
||||
},
|
||||
{
|
||||
label: 'anchorSelect',
|
||||
entry: 'vs/editor/contrib/anchorSelect/anchorSelect'
|
||||
},
|
||||
{
|
||||
label: 'bracketMatching',
|
||||
entry: 'vs/editor/contrib/bracketMatching/bracketMatching'
|
||||
},
|
||||
{
|
||||
label: 'caretOperations',
|
||||
entry: 'vs/editor/contrib/caretOperations/caretOperations'
|
||||
},
|
||||
{
|
||||
label: 'clipboard',
|
||||
entry: 'vs/editor/contrib/clipboard/clipboard'
|
||||
},
|
||||
{
|
||||
label: 'codeAction',
|
||||
entry: 'vs/editor/contrib/codeAction/codeActionContributions'
|
||||
},
|
||||
{
|
||||
label: 'codelens',
|
||||
entry: 'vs/editor/contrib/codelens/codelensController'
|
||||
},
|
||||
{
|
||||
label: 'colorPicker',
|
||||
entry: 'vs/editor/contrib/colorPicker/colorContributions'
|
||||
},
|
||||
{
|
||||
label: 'comment',
|
||||
entry: 'vs/editor/contrib/comment/comment'
|
||||
},
|
||||
{
|
||||
label: 'contextmenu',
|
||||
entry: 'vs/editor/contrib/contextmenu/contextmenu'
|
||||
},
|
||||
{
|
||||
label: 'coreCommands',
|
||||
entry: 'vs/editor/browser/controller/coreCommands'
|
||||
},
|
||||
{
|
||||
label: 'cursorUndo',
|
||||
entry: 'vs/editor/contrib/cursorUndo/cursorUndo'
|
||||
},
|
||||
{
|
||||
label: 'dnd',
|
||||
entry: 'vs/editor/contrib/dnd/dnd'
|
||||
},
|
||||
{
|
||||
label: 'documentSymbols',
|
||||
entry: 'vs/editor/contrib/documentSymbols/documentSymbols'
|
||||
},
|
||||
{
|
||||
label: 'find',
|
||||
entry: 'vs/editor/contrib/find/findController'
|
||||
},
|
||||
{
|
||||
label: 'folding',
|
||||
entry: 'vs/editor/contrib/folding/folding'
|
||||
},
|
||||
{
|
||||
label: 'fontZoom',
|
||||
entry: 'vs/editor/contrib/fontZoom/fontZoom'
|
||||
},
|
||||
{
|
||||
label: 'format',
|
||||
entry: 'vs/editor/contrib/format/formatActions'
|
||||
},
|
||||
{
|
||||
label: 'gotoError',
|
||||
entry: 'vs/editor/contrib/gotoError/gotoError'
|
||||
},
|
||||
{
|
||||
label: 'gotoLine',
|
||||
entry: 'vs/editor/standalone/browser/quickAccess/standaloneGotoLineQuickAccess'
|
||||
},
|
||||
{
|
||||
label: 'gotoSymbol',
|
||||
entry: [
|
||||
'vs/editor/contrib/gotoSymbol/goToCommands',
|
||||
'vs/editor/contrib/gotoSymbol/link/goToDefinitionAtPosition'
|
||||
]
|
||||
},
|
||||
{
|
||||
label: 'hover',
|
||||
entry: 'vs/editor/contrib/hover/hover'
|
||||
},
|
||||
{
|
||||
label: 'iPadShowKeyboard',
|
||||
entry: 'vs/editor/standalone/browser/iPadShowKeyboard/iPadShowKeyboard'
|
||||
},
|
||||
{
|
||||
label: 'inPlaceReplace',
|
||||
entry: 'vs/editor/contrib/inPlaceReplace/inPlaceReplace'
|
||||
},
|
||||
{
|
||||
label: 'indentation',
|
||||
entry: 'vs/editor/contrib/indentation/indentation'
|
||||
},
|
||||
{
|
||||
label: 'inlayHints',
|
||||
entry: 'vs/editor/contrib/inlayHints/inlayHintsController'
|
||||
},
|
||||
{
|
||||
label: 'inlineCompletions',
|
||||
entry: 'vs/editor/contrib/inlineCompletions/ghostTextController'
|
||||
},
|
||||
{
|
||||
label: 'inspectTokens',
|
||||
entry: 'vs/editor/standalone/browser/inspectTokens/inspectTokens'
|
||||
},
|
||||
{
|
||||
label: 'linesOperations',
|
||||
entry: 'vs/editor/contrib/linesOperations/linesOperations'
|
||||
},
|
||||
{
|
||||
label: 'linkedEditing',
|
||||
entry: 'vs/editor/contrib/linkedEditing/linkedEditing'
|
||||
},
|
||||
{
|
||||
label: 'links',
|
||||
entry: 'vs/editor/contrib/links/links'
|
||||
},
|
||||
{
|
||||
label: 'multicursor',
|
||||
entry: 'vs/editor/contrib/multicursor/multicursor'
|
||||
},
|
||||
{
|
||||
label: 'parameterHints',
|
||||
entry: 'vs/editor/contrib/parameterHints/parameterHints'
|
||||
},
|
||||
{
|
||||
label: 'quickCommand',
|
||||
entry: 'vs/editor/standalone/browser/quickAccess/standaloneCommandsQuickAccess'
|
||||
},
|
||||
{
|
||||
label: 'quickHelp',
|
||||
entry: 'vs/editor/standalone/browser/quickAccess/standaloneHelpQuickAccess'
|
||||
},
|
||||
{
|
||||
label: 'quickOutline',
|
||||
entry: 'vs/editor/standalone/browser/quickAccess/standaloneGotoSymbolQuickAccess'
|
||||
},
|
||||
{
|
||||
label: 'referenceSearch',
|
||||
entry: 'vs/editor/standalone/browser/referenceSearch/standaloneReferenceSearch'
|
||||
},
|
||||
{
|
||||
label: 'rename',
|
||||
entry: 'vs/editor/contrib/rename/rename'
|
||||
},
|
||||
{
|
||||
label: 'smartSelect',
|
||||
entry: 'vs/editor/contrib/smartSelect/smartSelect'
|
||||
},
|
||||
{
|
||||
label: 'snippets',
|
||||
entry: 'vs/editor/contrib/snippet/snippetController2'
|
||||
},
|
||||
{
|
||||
label: 'suggest',
|
||||
entry: 'vs/editor/contrib/suggest/suggestController'
|
||||
},
|
||||
{
|
||||
label: 'toggleHighContrast',
|
||||
entry: 'vs/editor/standalone/browser/toggleHighContrast/toggleHighContrast'
|
||||
},
|
||||
{
|
||||
label: 'toggleTabFocusMode',
|
||||
entry: 'vs/editor/contrib/toggleTabFocusMode/toggleTabFocusMode'
|
||||
},
|
||||
{
|
||||
label: 'transpose',
|
||||
entry: 'vs/editor/contrib/caretOperations/transpose'
|
||||
},
|
||||
{
|
||||
label: 'unusualLineTerminators',
|
||||
entry: 'vs/editor/contrib/unusualLineTerminators/unusualLineTerminators'
|
||||
},
|
||||
{
|
||||
label: 'viewportSemanticTokens',
|
||||
entry: 'vs/editor/contrib/viewportSemanticTokens/viewportSemanticTokens'
|
||||
},
|
||||
{
|
||||
label: 'wordHighlighter',
|
||||
entry: 'vs/editor/contrib/wordHighlighter/wordHighlighter'
|
||||
},
|
||||
{
|
||||
label: 'wordOperations',
|
||||
entry: 'vs/editor/contrib/wordOperations/wordOperations'
|
||||
},
|
||||
{
|
||||
label: 'wordPartOperations',
|
||||
entry: 'vs/editor/contrib/wordPartOperations/wordPartOperations'
|
||||
}
|
||||
];
|
||||
|
||||
export type EditorFeature =
|
||||
| 'accessibilityHelp'
|
||||
| 'anchorSelect'
|
||||
| 'bracketMatching'
|
||||
| 'caretOperations'
|
||||
| 'clipboard'
|
||||
| 'codeAction'
|
||||
| 'codelens'
|
||||
| 'colorPicker'
|
||||
| 'comment'
|
||||
| 'contextmenu'
|
||||
| 'coreCommands'
|
||||
| 'cursorUndo'
|
||||
| 'dnd'
|
||||
| 'documentSymbols'
|
||||
| 'find'
|
||||
| 'folding'
|
||||
| 'fontZoom'
|
||||
| 'format'
|
||||
| 'gotoError'
|
||||
| 'gotoLine'
|
||||
| 'gotoSymbol'
|
||||
| 'hover'
|
||||
| 'iPadShowKeyboard'
|
||||
| 'inPlaceReplace'
|
||||
| 'indentation'
|
||||
| 'inlayHints'
|
||||
| 'inlineCompletions'
|
||||
| 'inspectTokens'
|
||||
| 'linesOperations'
|
||||
| 'linkedEditing'
|
||||
| 'links'
|
||||
| 'multicursor'
|
||||
| 'parameterHints'
|
||||
| 'quickCommand'
|
||||
| 'quickHelp'
|
||||
| 'quickOutline'
|
||||
| 'referenceSearch'
|
||||
| 'rename'
|
||||
| 'smartSelect'
|
||||
| 'snippets'
|
||||
| 'suggest'
|
||||
| 'toggleHighContrast'
|
||||
| 'toggleTabFocusMode'
|
||||
| 'transpose'
|
||||
| 'unusualLineTerminators'
|
||||
| 'viewportSemanticTokens'
|
||||
| 'wordHighlighter'
|
||||
| 'wordOperations'
|
||||
| 'wordPartOperations';
|
||||
|
||||
export type NegatedEditorFeature =
|
||||
| '!accessibilityHelp'
|
||||
| '!anchorSelect'
|
||||
| '!bracketMatching'
|
||||
| '!caretOperations'
|
||||
| '!clipboard'
|
||||
| '!codeAction'
|
||||
| '!codelens'
|
||||
| '!colorPicker'
|
||||
| '!comment'
|
||||
| '!contextmenu'
|
||||
| '!coreCommands'
|
||||
| '!cursorUndo'
|
||||
| '!dnd'
|
||||
| '!documentSymbols'
|
||||
| '!find'
|
||||
| '!folding'
|
||||
| '!fontZoom'
|
||||
| '!format'
|
||||
| '!gotoError'
|
||||
| '!gotoLine'
|
||||
| '!gotoSymbol'
|
||||
| '!hover'
|
||||
| '!iPadShowKeyboard'
|
||||
| '!inPlaceReplace'
|
||||
| '!indentation'
|
||||
| '!inlayHints'
|
||||
| '!inlineCompletions'
|
||||
| '!inspectTokens'
|
||||
| '!linesOperations'
|
||||
| '!linkedEditing'
|
||||
| '!links'
|
||||
| '!multicursor'
|
||||
| '!parameterHints'
|
||||
| '!quickCommand'
|
||||
| '!quickHelp'
|
||||
| '!quickOutline'
|
||||
| '!referenceSearch'
|
||||
| '!rename'
|
||||
| '!smartSelect'
|
||||
| '!snippets'
|
||||
| '!suggest'
|
||||
| '!toggleHighContrast'
|
||||
| '!toggleTabFocusMode'
|
||||
| '!transpose'
|
||||
| '!unusualLineTerminators'
|
||||
| '!viewportSemanticTokens'
|
||||
| '!wordHighlighter'
|
||||
| '!wordOperations'
|
||||
| '!wordPartOperations';
|
||||
|
|
@ -3,11 +3,13 @@ import * as path from 'path';
|
|||
import * as loaderUtils from 'loader-utils';
|
||||
import * as fs from 'fs';
|
||||
import { AddWorkerEntryPointPlugin } from './plugins/AddWorkerEntryPointPlugin';
|
||||
import { languagesArr, EditorLanguage } from './languages';
|
||||
import { featuresArr, EditorFeature, NegatedEditorFeature } from './features';
|
||||
import { IFeatureDefinition } from './types';
|
||||
import { ILoaderOptions } from './loaders/include';
|
||||
|
||||
// TODO: replace once a new monaco-editor version is published
|
||||
// import { EditorLanguage, EditorFeature, NegatedEditorFeature } from 'monaco-editor/esm/metadata';
|
||||
import { EditorLanguage, EditorFeature, NegatedEditorFeature } from './metadata';
|
||||
|
||||
const INCLUDE_LOADER_PATH = require.resolve('./loaders/include');
|
||||
|
||||
const EDITOR_MODULE: IFeatureDefinition = {
|
||||
|
|
@ -19,12 +21,6 @@ const EDITOR_MODULE: IFeatureDefinition = {
|
|||
}
|
||||
};
|
||||
|
||||
const languagesById: { [language: string]: IFeatureDefinition } = {};
|
||||
languagesArr.forEach((language) => (languagesById[language.label] = language));
|
||||
|
||||
const featuresById: { [feature: string]: IFeatureDefinition } = {};
|
||||
featuresArr.forEach((feature) => (featuresById[feature.label] = feature));
|
||||
|
||||
/**
|
||||
* Return a resolved path for a given Monaco file.
|
||||
*/
|
||||
|
|
@ -57,14 +53,30 @@ function getWorkerFilename(
|
|||
});
|
||||
}
|
||||
|
||||
function getFeaturesIds(userFeatures: string[]): string[] {
|
||||
interface EditorMetadata {
|
||||
features: IFeatureDefinition[];
|
||||
languages: IFeatureDefinition[];
|
||||
}
|
||||
|
||||
function getEditorMetadata(monacoEditorPath: string | undefined): EditorMetadata {
|
||||
const metadataPath = resolveMonacoPath('metadata.js', monacoEditorPath);
|
||||
return require(metadataPath);
|
||||
}
|
||||
|
||||
function resolveDesiredFeatures(
|
||||
metadata: EditorMetadata,
|
||||
userFeatures: (EditorFeature | NegatedEditorFeature)[] | undefined
|
||||
): IFeatureDefinition[] {
|
||||
const featuresById: { [feature: string]: IFeatureDefinition } = {};
|
||||
metadata.features.forEach((feature) => (featuresById[feature.label] = feature));
|
||||
|
||||
function notContainedIn(arr: string[]) {
|
||||
return (element: string) => arr.indexOf(element) === -1;
|
||||
}
|
||||
|
||||
let featuresIds: string[];
|
||||
|
||||
if (userFeatures.length) {
|
||||
if (userFeatures && userFeatures.length) {
|
||||
const excludedFeatures = userFeatures.filter((f) => f[0] === '!').map((f) => f.slice(1));
|
||||
if (excludedFeatures.length) {
|
||||
featuresIds = Object.keys(featuresById).filter(notContainedIn(excludedFeatures));
|
||||
|
|
@ -75,7 +87,19 @@ function getFeaturesIds(userFeatures: string[]): string[] {
|
|||
featuresIds = Object.keys(featuresById);
|
||||
}
|
||||
|
||||
return featuresIds;
|
||||
return coalesce(featuresIds.map((id) => featuresById[id]));
|
||||
}
|
||||
|
||||
function resolveDesiredLanguages(
|
||||
metadata: EditorMetadata,
|
||||
userLanguages: EditorLanguage[] | undefined,
|
||||
userCustomLanguages: IFeatureDefinition[] | undefined
|
||||
): IFeatureDefinition[] {
|
||||
const languagesById: { [language: string]: IFeatureDefinition } = {};
|
||||
metadata.languages.forEach((language) => (languagesById[language.label] = language));
|
||||
|
||||
const languages = userLanguages || Object.keys(languagesById);
|
||||
return coalesce(languages.map((id) => languagesById[id])).concat(userCustomLanguages || []);
|
||||
}
|
||||
|
||||
interface IMonacoEditorWebpackPluginOpts {
|
||||
|
|
@ -138,14 +162,15 @@ class MonacoEditorWebpackPlugin implements webpack.WebpackPluginInstance {
|
|||
private readonly options: IInternalMonacoEditorWebpackPluginOpts;
|
||||
|
||||
constructor(options: IMonacoEditorWebpackPluginOpts = {}) {
|
||||
const languages = options.languages || Object.keys(languagesById);
|
||||
const customLanguages = options.customLanguages || [];
|
||||
const features = getFeaturesIds(options.features || []);
|
||||
const monacoEditorPath = options.monacoEditorPath;
|
||||
const metadata = getEditorMetadata(monacoEditorPath);
|
||||
const languages = resolveDesiredLanguages(metadata, options.languages, options.customLanguages);
|
||||
const features = resolveDesiredFeatures(metadata, options.features);
|
||||
this.options = {
|
||||
languages: coalesce(languages.map((id) => languagesById[id])).concat(customLanguages),
|
||||
features: coalesce(features.map((id) => featuresById[id])),
|
||||
languages,
|
||||
features,
|
||||
filename: options.filename || '[name].worker.js',
|
||||
monacoEditorPath: options.monacoEditorPath,
|
||||
monacoEditorPath,
|
||||
publicPath: options.publicPath || '',
|
||||
globalAPI: options.globalAPI || false
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,414 +0,0 @@
|
|||
//
|
||||
// THIS IS A GENERATED FILE. PLEASE DO NOT EDIT DIRECTLY.
|
||||
// GENERATED USING node scripts/import-editor.js
|
||||
//
|
||||
import { IFeatureDefinition } from './types';
|
||||
|
||||
export const languagesArr: IFeatureDefinition[] = [
|
||||
{
|
||||
label: 'abap',
|
||||
entry: 'vs/basic-languages/abap/abap.contribution'
|
||||
},
|
||||
{
|
||||
label: 'apex',
|
||||
entry: 'vs/basic-languages/apex/apex.contribution'
|
||||
},
|
||||
{
|
||||
label: 'azcli',
|
||||
entry: 'vs/basic-languages/azcli/azcli.contribution'
|
||||
},
|
||||
{
|
||||
label: 'bat',
|
||||
entry: 'vs/basic-languages/bat/bat.contribution'
|
||||
},
|
||||
{
|
||||
label: 'bicep',
|
||||
entry: 'vs/basic-languages/bicep/bicep.contribution'
|
||||
},
|
||||
{
|
||||
label: 'cameligo',
|
||||
entry: 'vs/basic-languages/cameligo/cameligo.contribution'
|
||||
},
|
||||
{
|
||||
label: 'clojure',
|
||||
entry: 'vs/basic-languages/clojure/clojure.contribution'
|
||||
},
|
||||
{
|
||||
label: 'coffee',
|
||||
entry: 'vs/basic-languages/coffee/coffee.contribution'
|
||||
},
|
||||
{
|
||||
label: 'cpp',
|
||||
entry: 'vs/basic-languages/cpp/cpp.contribution'
|
||||
},
|
||||
{
|
||||
label: 'csharp',
|
||||
entry: 'vs/basic-languages/csharp/csharp.contribution'
|
||||
},
|
||||
{
|
||||
label: 'csp',
|
||||
entry: 'vs/basic-languages/csp/csp.contribution'
|
||||
},
|
||||
{
|
||||
label: 'css',
|
||||
entry: ['vs/basic-languages/css/css.contribution', 'vs/language/css/monaco.contribution'],
|
||||
worker: {
|
||||
id: 'vs/language/css/cssWorker',
|
||||
entry: 'vs/language/css/css.worker'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'dart',
|
||||
entry: 'vs/basic-languages/dart/dart.contribution'
|
||||
},
|
||||
{
|
||||
label: 'dockerfile',
|
||||
entry: 'vs/basic-languages/dockerfile/dockerfile.contribution'
|
||||
},
|
||||
{
|
||||
label: 'ecl',
|
||||
entry: 'vs/basic-languages/ecl/ecl.contribution'
|
||||
},
|
||||
{
|
||||
label: 'elixir',
|
||||
entry: 'vs/basic-languages/elixir/elixir.contribution'
|
||||
},
|
||||
{
|
||||
label: 'flow9',
|
||||
entry: 'vs/basic-languages/flow9/flow9.contribution'
|
||||
},
|
||||
{
|
||||
label: 'fsharp',
|
||||
entry: 'vs/basic-languages/fsharp/fsharp.contribution'
|
||||
},
|
||||
{
|
||||
label: 'go',
|
||||
entry: 'vs/basic-languages/go/go.contribution'
|
||||
},
|
||||
{
|
||||
label: 'graphql',
|
||||
entry: 'vs/basic-languages/graphql/graphql.contribution'
|
||||
},
|
||||
{
|
||||
label: 'handlebars',
|
||||
entry: 'vs/basic-languages/handlebars/handlebars.contribution'
|
||||
},
|
||||
{
|
||||
label: 'hcl',
|
||||
entry: 'vs/basic-languages/hcl/hcl.contribution'
|
||||
},
|
||||
{
|
||||
label: 'html',
|
||||
entry: ['vs/basic-languages/html/html.contribution', 'vs/language/html/monaco.contribution'],
|
||||
worker: {
|
||||
id: 'vs/language/html/htmlWorker',
|
||||
entry: 'vs/language/html/html.worker'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'ini',
|
||||
entry: 'vs/basic-languages/ini/ini.contribution'
|
||||
},
|
||||
{
|
||||
label: 'java',
|
||||
entry: 'vs/basic-languages/java/java.contribution'
|
||||
},
|
||||
{
|
||||
label: 'javascript',
|
||||
entry: 'vs/basic-languages/javascript/javascript.contribution'
|
||||
},
|
||||
{
|
||||
label: 'json',
|
||||
entry: 'vs/language/json/monaco.contribution',
|
||||
worker: {
|
||||
id: 'vs/language/json/jsonWorker',
|
||||
entry: 'vs/language/json/json.worker'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'julia',
|
||||
entry: 'vs/basic-languages/julia/julia.contribution'
|
||||
},
|
||||
{
|
||||
label: 'kotlin',
|
||||
entry: 'vs/basic-languages/kotlin/kotlin.contribution'
|
||||
},
|
||||
{
|
||||
label: 'less',
|
||||
entry: 'vs/basic-languages/less/less.contribution'
|
||||
},
|
||||
{
|
||||
label: 'lexon',
|
||||
entry: 'vs/basic-languages/lexon/lexon.contribution'
|
||||
},
|
||||
{
|
||||
label: 'liquid',
|
||||
entry: 'vs/basic-languages/liquid/liquid.contribution'
|
||||
},
|
||||
{
|
||||
label: 'lua',
|
||||
entry: 'vs/basic-languages/lua/lua.contribution'
|
||||
},
|
||||
{
|
||||
label: 'm3',
|
||||
entry: 'vs/basic-languages/m3/m3.contribution'
|
||||
},
|
||||
{
|
||||
label: 'markdown',
|
||||
entry: 'vs/basic-languages/markdown/markdown.contribution'
|
||||
},
|
||||
{
|
||||
label: 'mips',
|
||||
entry: 'vs/basic-languages/mips/mips.contribution'
|
||||
},
|
||||
{
|
||||
label: 'msdax',
|
||||
entry: 'vs/basic-languages/msdax/msdax.contribution'
|
||||
},
|
||||
{
|
||||
label: 'mysql',
|
||||
entry: 'vs/basic-languages/mysql/mysql.contribution'
|
||||
},
|
||||
{
|
||||
label: 'objective-c',
|
||||
entry: 'vs/basic-languages/objective-c/objective-c.contribution'
|
||||
},
|
||||
{
|
||||
label: 'pascal',
|
||||
entry: 'vs/basic-languages/pascal/pascal.contribution'
|
||||
},
|
||||
{
|
||||
label: 'pascaligo',
|
||||
entry: 'vs/basic-languages/pascaligo/pascaligo.contribution'
|
||||
},
|
||||
{
|
||||
label: 'perl',
|
||||
entry: 'vs/basic-languages/perl/perl.contribution'
|
||||
},
|
||||
{
|
||||
label: 'pgsql',
|
||||
entry: 'vs/basic-languages/pgsql/pgsql.contribution'
|
||||
},
|
||||
{
|
||||
label: 'php',
|
||||
entry: 'vs/basic-languages/php/php.contribution'
|
||||
},
|
||||
{
|
||||
label: 'pla',
|
||||
entry: 'vs/basic-languages/pla/pla.contribution'
|
||||
},
|
||||
{
|
||||
label: 'postiats',
|
||||
entry: 'vs/basic-languages/postiats/postiats.contribution'
|
||||
},
|
||||
{
|
||||
label: 'powerquery',
|
||||
entry: 'vs/basic-languages/powerquery/powerquery.contribution'
|
||||
},
|
||||
{
|
||||
label: 'powershell',
|
||||
entry: 'vs/basic-languages/powershell/powershell.contribution'
|
||||
},
|
||||
{
|
||||
label: 'protobuf',
|
||||
entry: 'vs/basic-languages/protobuf/protobuf.contribution'
|
||||
},
|
||||
{
|
||||
label: 'pug',
|
||||
entry: 'vs/basic-languages/pug/pug.contribution'
|
||||
},
|
||||
{
|
||||
label: 'python',
|
||||
entry: 'vs/basic-languages/python/python.contribution'
|
||||
},
|
||||
{
|
||||
label: 'qsharp',
|
||||
entry: 'vs/basic-languages/qsharp/qsharp.contribution'
|
||||
},
|
||||
{
|
||||
label: 'r',
|
||||
entry: 'vs/basic-languages/r/r.contribution'
|
||||
},
|
||||
{
|
||||
label: 'razor',
|
||||
entry: 'vs/basic-languages/razor/razor.contribution'
|
||||
},
|
||||
{
|
||||
label: 'redis',
|
||||
entry: 'vs/basic-languages/redis/redis.contribution'
|
||||
},
|
||||
{
|
||||
label: 'redshift',
|
||||
entry: 'vs/basic-languages/redshift/redshift.contribution'
|
||||
},
|
||||
{
|
||||
label: 'restructuredtext',
|
||||
entry: 'vs/basic-languages/restructuredtext/restructuredtext.contribution'
|
||||
},
|
||||
{
|
||||
label: 'ruby',
|
||||
entry: 'vs/basic-languages/ruby/ruby.contribution'
|
||||
},
|
||||
{
|
||||
label: 'rust',
|
||||
entry: 'vs/basic-languages/rust/rust.contribution'
|
||||
},
|
||||
{
|
||||
label: 'sb',
|
||||
entry: 'vs/basic-languages/sb/sb.contribution'
|
||||
},
|
||||
{
|
||||
label: 'scala',
|
||||
entry: 'vs/basic-languages/scala/scala.contribution'
|
||||
},
|
||||
{
|
||||
label: 'scheme',
|
||||
entry: 'vs/basic-languages/scheme/scheme.contribution'
|
||||
},
|
||||
{
|
||||
label: 'scss',
|
||||
entry: 'vs/basic-languages/scss/scss.contribution'
|
||||
},
|
||||
{
|
||||
label: 'shell',
|
||||
entry: 'vs/basic-languages/shell/shell.contribution'
|
||||
},
|
||||
{
|
||||
label: 'solidity',
|
||||
entry: 'vs/basic-languages/solidity/solidity.contribution'
|
||||
},
|
||||
{
|
||||
label: 'sophia',
|
||||
entry: 'vs/basic-languages/sophia/sophia.contribution'
|
||||
},
|
||||
{
|
||||
label: 'sparql',
|
||||
entry: 'vs/basic-languages/sparql/sparql.contribution'
|
||||
},
|
||||
{
|
||||
label: 'sql',
|
||||
entry: 'vs/basic-languages/sql/sql.contribution'
|
||||
},
|
||||
{
|
||||
label: 'st',
|
||||
entry: 'vs/basic-languages/st/st.contribution'
|
||||
},
|
||||
{
|
||||
label: 'swift',
|
||||
entry: 'vs/basic-languages/swift/swift.contribution'
|
||||
},
|
||||
{
|
||||
label: 'systemverilog',
|
||||
entry: 'vs/basic-languages/systemverilog/systemverilog.contribution'
|
||||
},
|
||||
{
|
||||
label: 'tcl',
|
||||
entry: 'vs/basic-languages/tcl/tcl.contribution'
|
||||
},
|
||||
{
|
||||
label: 'twig',
|
||||
entry: 'vs/basic-languages/twig/twig.contribution'
|
||||
},
|
||||
{
|
||||
label: 'typescript',
|
||||
entry: [
|
||||
'vs/basic-languages/typescript/typescript.contribution',
|
||||
'vs/language/typescript/monaco.contribution'
|
||||
],
|
||||
worker: {
|
||||
id: 'vs/language/typescript/tsWorker',
|
||||
entry: 'vs/language/typescript/ts.worker'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: 'vb',
|
||||
entry: 'vs/basic-languages/vb/vb.contribution'
|
||||
},
|
||||
{
|
||||
label: 'xml',
|
||||
entry: 'vs/basic-languages/xml/xml.contribution'
|
||||
},
|
||||
{
|
||||
label: 'yaml',
|
||||
entry: 'vs/basic-languages/yaml/yaml.contribution'
|
||||
}
|
||||
];
|
||||
|
||||
export type EditorLanguage =
|
||||
| 'abap'
|
||||
| 'apex'
|
||||
| 'azcli'
|
||||
| 'bat'
|
||||
| 'bicep'
|
||||
| 'cameligo'
|
||||
| 'clojure'
|
||||
| 'coffee'
|
||||
| 'cpp'
|
||||
| 'csharp'
|
||||
| 'csp'
|
||||
| 'css'
|
||||
| 'dart'
|
||||
| 'dockerfile'
|
||||
| 'ecl'
|
||||
| 'elixir'
|
||||
| 'flow9'
|
||||
| 'fsharp'
|
||||
| 'go'
|
||||
| 'graphql'
|
||||
| 'handlebars'
|
||||
| 'hcl'
|
||||
| 'html'
|
||||
| 'ini'
|
||||
| 'java'
|
||||
| 'javascript'
|
||||
| 'json'
|
||||
| 'julia'
|
||||
| 'kotlin'
|
||||
| 'less'
|
||||
| 'lexon'
|
||||
| 'liquid'
|
||||
| 'lua'
|
||||
| 'm3'
|
||||
| 'markdown'
|
||||
| 'mips'
|
||||
| 'msdax'
|
||||
| 'mysql'
|
||||
| 'objective-c'
|
||||
| 'pascal'
|
||||
| 'pascaligo'
|
||||
| 'perl'
|
||||
| 'pgsql'
|
||||
| 'php'
|
||||
| 'pla'
|
||||
| 'postiats'
|
||||
| 'powerquery'
|
||||
| 'powershell'
|
||||
| 'protobuf'
|
||||
| 'pug'
|
||||
| 'python'
|
||||
| 'qsharp'
|
||||
| 'r'
|
||||
| 'razor'
|
||||
| 'redis'
|
||||
| 'redshift'
|
||||
| 'restructuredtext'
|
||||
| 'ruby'
|
||||
| 'rust'
|
||||
| 'sb'
|
||||
| 'scala'
|
||||
| 'scheme'
|
||||
| 'scss'
|
||||
| 'shell'
|
||||
| 'solidity'
|
||||
| 'sophia'
|
||||
| 'sparql'
|
||||
| 'sql'
|
||||
| 'st'
|
||||
| 'swift'
|
||||
| 'systemverilog'
|
||||
| 'tcl'
|
||||
| 'twig'
|
||||
| 'typescript'
|
||||
| 'vb'
|
||||
| 'xml'
|
||||
| 'yaml';
|
||||
195
webpack-plugin/src/metadata.d.ts
vendored
Normal file
195
webpack-plugin/src/metadata.d.ts
vendored
Normal file
|
|
@ -0,0 +1,195 @@
|
|||
export interface IWorkerDefinition {
|
||||
id: string;
|
||||
entry: string;
|
||||
}
|
||||
|
||||
export interface IFeatureDefinition {
|
||||
label: string;
|
||||
entry: string | string[] | undefined;
|
||||
worker?: IWorkerDefinition;
|
||||
}
|
||||
|
||||
export const features: IFeatureDefinition[];
|
||||
|
||||
export const languages: IFeatureDefinition[];
|
||||
|
||||
export type EditorLanguage =
|
||||
| 'abap'
|
||||
| 'apex'
|
||||
| 'azcli'
|
||||
| 'bat'
|
||||
| 'bicep'
|
||||
| 'cameligo'
|
||||
| 'clojure'
|
||||
| 'coffee'
|
||||
| 'cpp'
|
||||
| 'csharp'
|
||||
| 'csp'
|
||||
| 'css'
|
||||
| 'dart'
|
||||
| 'dockerfile'
|
||||
| 'ecl'
|
||||
| 'elixir'
|
||||
| 'flow9'
|
||||
| 'fsharp'
|
||||
| 'go'
|
||||
| 'graphql'
|
||||
| 'handlebars'
|
||||
| 'hcl'
|
||||
| 'html'
|
||||
| 'ini'
|
||||
| 'java'
|
||||
| 'javascript'
|
||||
| 'json'
|
||||
| 'julia'
|
||||
| 'kotlin'
|
||||
| 'less'
|
||||
| 'lexon'
|
||||
| 'liquid'
|
||||
| 'lua'
|
||||
| 'm3'
|
||||
| 'markdown'
|
||||
| 'mips'
|
||||
| 'msdax'
|
||||
| 'mysql'
|
||||
| 'objective-c'
|
||||
| 'pascal'
|
||||
| 'pascaligo'
|
||||
| 'perl'
|
||||
| 'pgsql'
|
||||
| 'php'
|
||||
| 'pla'
|
||||
| 'postiats'
|
||||
| 'powerquery'
|
||||
| 'powershell'
|
||||
| 'protobuf'
|
||||
| 'pug'
|
||||
| 'python'
|
||||
| 'qsharp'
|
||||
| 'r'
|
||||
| 'razor'
|
||||
| 'redis'
|
||||
| 'redshift'
|
||||
| 'restructuredtext'
|
||||
| 'ruby'
|
||||
| 'rust'
|
||||
| 'sb'
|
||||
| 'scala'
|
||||
| 'scheme'
|
||||
| 'scss'
|
||||
| 'shell'
|
||||
| 'solidity'
|
||||
| 'sophia'
|
||||
| 'sparql'
|
||||
| 'sql'
|
||||
| 'st'
|
||||
| 'swift'
|
||||
| 'systemverilog'
|
||||
| 'tcl'
|
||||
| 'twig'
|
||||
| 'typescript'
|
||||
| 'vb'
|
||||
| 'xml'
|
||||
| 'yaml';
|
||||
|
||||
export type EditorFeature =
|
||||
| 'accessibilityHelp'
|
||||
| 'anchorSelect'
|
||||
| 'bracketMatching'
|
||||
| 'caretOperations'
|
||||
| 'clipboard'
|
||||
| 'codeAction'
|
||||
| 'codelens'
|
||||
| 'colorPicker'
|
||||
| 'comment'
|
||||
| 'contextmenu'
|
||||
| 'coreCommands'
|
||||
| 'cursorUndo'
|
||||
| 'dnd'
|
||||
| 'documentSymbols'
|
||||
| 'find'
|
||||
| 'folding'
|
||||
| 'fontZoom'
|
||||
| 'format'
|
||||
| 'gotoError'
|
||||
| 'gotoLine'
|
||||
| 'gotoSymbol'
|
||||
| 'hover'
|
||||
| 'iPadShowKeyboard'
|
||||
| 'inPlaceReplace'
|
||||
| 'indentation'
|
||||
| 'inlayHints'
|
||||
| 'inlineCompletions'
|
||||
| 'inspectTokens'
|
||||
| 'linesOperations'
|
||||
| 'linkedEditing'
|
||||
| 'links'
|
||||
| 'multicursor'
|
||||
| 'parameterHints'
|
||||
| 'quickCommand'
|
||||
| 'quickHelp'
|
||||
| 'quickOutline'
|
||||
| 'referenceSearch'
|
||||
| 'rename'
|
||||
| 'smartSelect'
|
||||
| 'snippets'
|
||||
| 'suggest'
|
||||
| 'toggleHighContrast'
|
||||
| 'toggleTabFocusMode'
|
||||
| 'transpose'
|
||||
| 'unusualLineTerminators'
|
||||
| 'viewportSemanticTokens'
|
||||
| 'wordHighlighter'
|
||||
| 'wordOperations'
|
||||
| 'wordPartOperations';
|
||||
|
||||
export type NegatedEditorFeature =
|
||||
| '!accessibilityHelp'
|
||||
| '!anchorSelect'
|
||||
| '!bracketMatching'
|
||||
| '!caretOperations'
|
||||
| '!clipboard'
|
||||
| '!codeAction'
|
||||
| '!codelens'
|
||||
| '!colorPicker'
|
||||
| '!comment'
|
||||
| '!contextmenu'
|
||||
| '!coreCommands'
|
||||
| '!cursorUndo'
|
||||
| '!dnd'
|
||||
| '!documentSymbols'
|
||||
| '!find'
|
||||
| '!folding'
|
||||
| '!fontZoom'
|
||||
| '!format'
|
||||
| '!gotoError'
|
||||
| '!gotoLine'
|
||||
| '!gotoSymbol'
|
||||
| '!hover'
|
||||
| '!iPadShowKeyboard'
|
||||
| '!inPlaceReplace'
|
||||
| '!indentation'
|
||||
| '!inlayHints'
|
||||
| '!inlineCompletions'
|
||||
| '!inspectTokens'
|
||||
| '!linesOperations'
|
||||
| '!linkedEditing'
|
||||
| '!links'
|
||||
| '!multicursor'
|
||||
| '!parameterHints'
|
||||
| '!quickCommand'
|
||||
| '!quickHelp'
|
||||
| '!quickOutline'
|
||||
| '!referenceSearch'
|
||||
| '!rename'
|
||||
| '!smartSelect'
|
||||
| '!snippets'
|
||||
| '!suggest'
|
||||
| '!toggleHighContrast'
|
||||
| '!toggleTabFocusMode'
|
||||
| '!transpose'
|
||||
| '!unusualLineTerminators'
|
||||
| '!viewportSemanticTokens'
|
||||
| '!wordHighlighter'
|
||||
| '!wordOperations'
|
||||
| '!wordPartOperations';
|
||||
Loading…
Add table
Add a link
Reference in a new issue