Adding parameter and response validation.
Adding prettier formatting support. Add warning when no targets are selected.
This commit is contained in:
@ -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));
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user