mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
Use a regex for injecting vs/editor/editor.api as a dependency
This commit is contained in:
parent
c09657381e
commit
2ff2f65be7
1 changed files with 2 additions and 23 deletions
25
gulpfile.js
25
gulpfile.js
|
|
@ -185,29 +185,8 @@ function addPluginContribs(type) {
|
|||
var contribContents = fs.readFileSync(contribPath).toString();
|
||||
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/language/css/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/language/css/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/language/html/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/language/html/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/language/json/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/language/json/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
// You can find both types of quotes in the TypeScript files
|
||||
contribContents = contribContents.replace(
|
||||
`define("vs/language/typescript/fillers/monaco-editor-core",[],`,
|
||||
`define("vs/language/typescript/fillers/monaco-editor-core",['vs/editor/editor.api'],`,
|
||||
);
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/language/typescript/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/language/typescript/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/basic-languages/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/basic-languages/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
/define\((['"][a-z\/\-]+\/fillers\/monaco-editor-core['"]),\[\],/,
|
||||
'define($1,[\'vs/editor/editor.api\'],'
|
||||
);
|
||||
|
||||
extraContent.push(contribContents);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue