mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Run prettier
This commit is contained in:
parent
21ceb6a387
commit
b87c75d7e9
20 changed files with 3351 additions and 2779 deletions
|
|
@ -30,22 +30,25 @@ bundleOne('tsMode');
|
|||
bundleOne('tsWorker');
|
||||
|
||||
function bundleOne(moduleId, exclude) {
|
||||
requirejs.optimize({
|
||||
baseUrl: 'release/dev/',
|
||||
name: 'vs/language/typescript/' + moduleId,
|
||||
out: 'release/min/' + moduleId + '.js',
|
||||
exclude: exclude,
|
||||
paths: {
|
||||
'vs/language/typescript': REPO_ROOT + '/release/dev'
|
||||
requirejs.optimize(
|
||||
{
|
||||
baseUrl: 'release/dev/',
|
||||
name: 'vs/language/typescript/' + moduleId,
|
||||
out: 'release/min/' + moduleId + '.js',
|
||||
exclude: exclude,
|
||||
paths: {
|
||||
'vs/language/typescript': REPO_ROOT + '/release/dev'
|
||||
},
|
||||
optimize: 'none'
|
||||
},
|
||||
optimize: 'none'
|
||||
}, async function(buildResponse) {
|
||||
const filePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js');
|
||||
const fileContents = fs.readFileSync(filePath).toString();
|
||||
console.log();
|
||||
console.log(`Minifying ${filePath}...`);
|
||||
const result = await terser.minify(fileContents);
|
||||
console.log(`Done minifying ${filePath}.`);
|
||||
fs.writeFileSync(filePath, BUNDLED_FILE_HEADER + result.code);
|
||||
})
|
||||
async function (buildResponse) {
|
||||
const filePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js');
|
||||
const fileContents = fs.readFileSync(filePath).toString();
|
||||
console.log();
|
||||
console.log(`Minifying ${filePath}...`);
|
||||
const result = await terser.minify(fileContents);
|
||||
console.log(`Done minifying ${filePath}.`);
|
||||
fs.writeFileSync(filePath, BUNDLED_FILE_HEADER + result.code);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue