mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Changes for PR #30
This commit is contained in:
parent
6c73d7f708
commit
6b2271c1c1
9 changed files with 128 additions and 181 deletions
|
|
@ -29,8 +29,6 @@ bundleOne('monaco.contribution');
|
|||
bundleOne('tsMode');
|
||||
bundleOne('tsWorker');
|
||||
|
||||
updateImports('monaco.contribution');
|
||||
|
||||
function bundleOne(moduleId, exclude) {
|
||||
requirejs.optimize({
|
||||
baseUrl: 'release/dev/',
|
||||
|
|
@ -38,8 +36,7 @@ function bundleOne(moduleId, exclude) {
|
|||
out: 'release/min/' + moduleId + '.js',
|
||||
exclude: exclude,
|
||||
paths: {
|
||||
'vs/language/typescript': REPO_ROOT + '/release/dev',
|
||||
'vs/basic-languages': REPO_ROOT + '/node_modules/monaco-languages/release/dev'
|
||||
'vs/language/typescript': REPO_ROOT + '/release/dev'
|
||||
},
|
||||
optimize: 'none'
|
||||
}, function(buildResponse) {
|
||||
|
|
@ -56,10 +53,3 @@ function bundleOne(moduleId, exclude) {
|
|||
fs.writeFileSync(filePath, BUNDLED_FILE_HEADER + result.code);
|
||||
})
|
||||
}
|
||||
|
||||
function updateImports(moduleId) {
|
||||
const filePath = path.join(REPO_ROOT, 'release/esm/' + moduleId + '.js');
|
||||
let fileContents = fs.readFileSync(filePath).toString();
|
||||
fileContents = fileContents.replace(/vs\/basic-languages\//g, "../../basic-languages/");
|
||||
fs.writeFileSync(filePath, fileContents);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue