Fail the build when there is a TS compilation error

pull/2894/head
Alex Dima 3 years ago
parent 3159d3d6c9
commit 3aebbb1c42
No known key found for this signature in database
GPG Key ID: 39563C1504FDD0C9

@ -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…
Cancel
Save