diff options
Diffstat (limited to 'modding/compiler.js')
-rw-r--r-- | modding/compiler.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/modding/compiler.js b/modding/compiler.js new file mode 100644 index 0000000..693a1e3 --- /dev/null +++ b/modding/compiler.js @@ -0,0 +1,17 @@ +class BuildError extends Error {
+ constructor(orig, ...params) {
+ super(...params);
+ this.name = "BuildError";
+ this.stack = this.stack + "\n" + orig.stack;
+ }
+}
+
+const tsbuild = require('../typescript/builder');
+
+for (file of importedTypeScriptFiles) {
+ try {
+ tsbuild(file.file, homedir + "/.kartik/build/" + file.output);
+ } catch (e) {
+ throw new BuildError(e, "Error while building " + file.file + " from package " + file.pkg)
+ }
+}
\ No newline at end of file |