Adding parameter and response validation.

Adding prettier formatting support.
Add warning when no targets are selected.
This commit is contained in:
K35
2022-01-01 00:39:15 +00:00
parent cc6035eef0
commit 7da1cf0841
7 changed files with 248 additions and 132 deletions

View File

@ -143,12 +143,16 @@ export default function startCompile(options: CompileOptions) {
FS.writeFileSync(options.emitDefinitions, JSON.stringify(ir));
}
if(options.targets.length <= 0) {
console.log(Color.yellow("WARNING:"), "No targets selected!");
}
options.targets.forEach(target => {
const tg = Targets.get(target.type) as any
if(!tg) {
console.log(Color.red("ERROR:"), "Target not supported!");
return;
}
compile(ir, new tg(target.output)); //TODO: implement
compile(ir, new tg(target.output));
})
}