From 44210691ee8444509ac466a362337af77f2bcd49 Mon Sep 17 00:00:00 2001 From: Minteck <46352972+Minteck@users.noreply.github.com> Date: Tue, 20 Jul 2021 01:30:23 +0200 Subject: Commit --- modding/compiler.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modding/compiler.js (limited to 'modding/compiler.js') diff --git a/modding/compiler.js b/modding/compiler.js new file mode 100644 index 0000000..240c9a9 --- /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 -- cgit