mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
Also generate features.ts from the monaco-editor npm module
This commit is contained in:
parent
10a995c595
commit
6a5c30039f
4 changed files with 191 additions and 108 deletions
10
src/index.ts
10
src/index.ts
|
|
@ -3,8 +3,8 @@ import * as webpack from 'webpack';
|
|||
import * as loaderUtils from 'loader-utils';
|
||||
import * as fs from 'fs';
|
||||
import { AddWorkerEntryPointPlugin } from './plugins/AddWorkerEntryPointPlugin';
|
||||
import { languagesById } from './languages';
|
||||
import { featuresById } from './features';
|
||||
import { languagesArr } from './languages';
|
||||
import { featuresArr } from './features';
|
||||
import { IFeatureDefinition } from './types';
|
||||
|
||||
const INCLUDE_LOADER_PATH = require.resolve('./loaders/include');
|
||||
|
|
@ -18,6 +18,12 @@ 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.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue