build: properly fail prerender task (#5235)

* The prerender script that runs on the CI did not exit with a proper error-code when the `renderModuleFactory` failed due to errors like in #5233
This commit is contained in:
Paul Gschwendtner
2017-06-20 20:33:54 +02:00
committed by Jeremy Elbourn
parent a2a25bead0
commit 1a03ee15b3
+6 -1
View File
@@ -13,4 +13,9 @@ const result = renderModuleFactory(KitchenSinkServerModuleNgFactory, {
document: readFileSync(join(__dirname, 'index.html'), 'utf-8')
});
result.then(html => console.log(html));
result
.then(html => console.log(html))
// If rendering the module factory fails, exit the process with an error code because otherwise
// the CI task will not recognize the failure and will show as "success". The error message
// will be printed automatically by the `renderModuleFactory` method.
.catch(() => process.exit(1));