mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
Fail the build when there is a TS compilation error
This commit is contained in:
parent
3159d3d6c9
commit
3aebbb1c42
1 changed files with 4 additions and 1 deletions
|
|
@ -25,12 +25,15 @@ exports.REPO_ROOT = REPO_ROOT;
|
|||
function tsc(_projectPath) {
|
||||
const projectPath = path.join(REPO_ROOT, _projectPath);
|
||||
console.log(`Launching compiler at ${_projectPath}...`);
|
||||
cp.spawnSync(
|
||||
const res = cp.spawnSync(
|
||||
process.execPath,
|
||||
[path.join(__dirname, '../node_modules/typescript/lib/tsc.js'), '-p', projectPath],
|
||||
{ stdio: 'inherit' }
|
||||
);
|
||||
console.log(`Compiled ${_projectPath}`);
|
||||
if (res.status !== 0) {
|
||||
process.exit(res.status);
|
||||
}
|
||||
}
|
||||
exports.tsc = tsc;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue