mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Adopt terser breaking change
This commit is contained in:
parent
28d4512f33
commit
d75eee19c6
1 changed files with 3 additions and 4 deletions
|
|
@ -59,18 +59,17 @@ function bundleOne(moduleId) {
|
||||||
location: path.join(REPO_ROOT, '/out/amd/fillers'),
|
location: path.join(REPO_ROOT, '/out/amd/fillers'),
|
||||||
main: 'vscode-nls'
|
main: 'vscode-nls'
|
||||||
}]
|
}]
|
||||||
}, function (buildResponse) {
|
}, async function (buildResponse) {
|
||||||
const devFilePath = path.join(REPO_ROOT, 'release/dev/' + moduleId + '.js');
|
const devFilePath = path.join(REPO_ROOT, 'release/dev/' + moduleId + '.js');
|
||||||
const minFilePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js');
|
const minFilePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js');
|
||||||
const fileContents = fs.readFileSync(devFilePath).toString();
|
const fileContents = fs.readFileSync(devFilePath).toString();
|
||||||
console.log();
|
|
||||||
console.log(`Minifying ${devFilePath}...`);
|
console.log(`Minifying ${devFilePath}...`);
|
||||||
const result = Terser.minify(fileContents, {
|
const result = await Terser.minify(fileContents, {
|
||||||
output: {
|
output: {
|
||||||
comments: 'some'
|
comments: 'some'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log(`Done.`);
|
console.log(`Done minifying ${devFilePath}.`);
|
||||||
try { fs.mkdirSync(path.join(REPO_ROOT, 'release/min')) } catch (err) { }
|
try { fs.mkdirSync(path.join(REPO_ROOT, 'release/min')) } catch (err) { }
|
||||||
fs.writeFileSync(minFilePath, BUNDLED_FILE_HEADER + result.code);
|
fs.writeFileSync(minFilePath, BUNDLED_FILE_HEADER + result.code);
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue