@softvisio/core
Version:
Softisio core
49 lines (36 loc) • 934 B
JavaScript
export default class CliCommand {
constructor ( name, spec ) {
this.
this.
}
get name () {
return this.
}
get short () {
return this.
}
get title () {
return this.
}
// public
async getModule () {
if ( !this.
const config = { ...this.
delete config.short;
return config;
}
else {
if ( !this.
let module = this.
if ( typeof module === "function" ) module = await module();
if ( typeof module === "string" || module instanceof URL ) module = ( await import( module ) ).default;
this.
}
return this.
}
}
}
//