mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 18:32:56 +01:00
small tweaks
This commit is contained in:
parent
e441fd4498
commit
1b00da60ec
2 changed files with 16 additions and 3 deletions
|
|
@ -77,7 +77,7 @@ exports.removeDir = removeDir;
|
|||
/**
|
||||
* Launch the typescript compiler synchronously over a project.
|
||||
*
|
||||
* @param {string} projectPath
|
||||
* @param {string} _projectPath
|
||||
*/
|
||||
function tsc(_projectPath) {
|
||||
const projectPath = path.join(REPO_ROOT, _projectPath);
|
||||
|
|
@ -87,6 +87,19 @@ function tsc(_projectPath) {
|
|||
}
|
||||
exports.tsc = tsc;
|
||||
|
||||
/**
|
||||
* Launch prettier on a specific file.
|
||||
*
|
||||
* @param {string} _filePath
|
||||
*/
|
||||
function prettier(_filePath) {
|
||||
const filePath = path.join(REPO_ROOT, _filePath);
|
||||
cp.spawnSync(process.execPath, [path.join(__dirname, '../node_modules/prettier/bin-prettier.js'), '--write', filePath], { stdio: 'inherit', stderr: 'inherit' });
|
||||
|
||||
console.log(`Ran prettier over ${_filePath}`);
|
||||
}
|
||||
exports.prettier = prettier;
|
||||
|
||||
/**
|
||||
* Transform an external .d.ts file to an internal .d.ts file
|
||||
*
|
||||
|
|
@ -128,5 +141,7 @@ function dts(_source, _destination, namespace) {
|
|||
result.push(``);
|
||||
|
||||
fs.writeFileSync(destination, result.join('\n'));
|
||||
|
||||
prettier(_destination);
|
||||
}
|
||||
exports.dts = dts;
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ tsc(`monaco-css/src/tsconfig.json`);
|
|||
|
||||
dts(`monaco-css/out/amd/monaco.contribution.d.ts`, `monaco-css/monaco.d.ts`, 'monaco.languages.css');
|
||||
|
||||
cp.spawnSync(process.execPath, [path.join(__dirname, '../../node_modules/prettier/bin-prettier.js'), '--write', path.join(__dirname, '../monaco.d.ts')], { stdio: 'inherit', stderr: 'inherit' });
|
||||
|
||||
esbuild.build({
|
||||
entryPoints: ['src/cssMode.ts', 'src/css.worker.ts', 'src/monaco.contribution.ts'],
|
||||
bundle: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue