JS: return exit code from the NodeJs kotlinc-js wrapper
diff --git a/js/npm.templates/kotlin-compiler/bin/kotlinc-js-runner.js b/js/npm.templates/kotlin-compiler/bin/kotlinc-js-runner.js
index be7e2ba..6dd199b 100644
--- a/js/npm.templates/kotlin-compiler/bin/kotlinc-js-runner.js
+++ b/js/npm.templates/kotlin-compiler/bin/kotlinc-js-runner.js
@@ -20,4 +20,6 @@
var execPath = __dirname + '/kotlinc-js';
var args = process.argv.slice(2);
-spawn('"' + execPath + '"', args, { stdio: "inherit", shell: true });
+spawn('"' + execPath + '"', args, { stdio: "inherit", shell: true }).on('exit', function(exitCode) {
+ process.exit(exitCode);
+});