mirror of
https://github.com/esiur/esiur-js.git
synced 2025-06-26 23:03:13 +00:00
template
This commit is contained in:
@ -4,13 +4,13 @@ if (process.argv.length == 2) {
|
||||
console.log("Usage: <command> [arguments]");
|
||||
console.log("");
|
||||
console.log("Available commands:");
|
||||
console.log("\tget-template\tGet a template from an IIP link.");
|
||||
console.log("\tshell\tStart Node.js REPL with Esiur module loaded.");
|
||||
console.log("\tversion: Print Esiur version.");
|
||||
console.log("\tget-template\t\tGet a template from an IIP link.");
|
||||
console.log("\tshell\t\tStart Node.js REPL with Esiur module loaded.");
|
||||
console.log("\tversion\t\tPrint Esiur version.");
|
||||
console.log("");
|
||||
console.log("Global options:");
|
||||
console.log("\t-u, --username\tAuthentication username");
|
||||
console.log("\t-p, --password\tAuthentication password");
|
||||
console.log("\t-u, --username\tAuthentication username.");
|
||||
console.log("\t-p, --password\tAuthentication password.");
|
||||
console.log("\t-d, --dir\tName of the directory to generate model inside.");
|
||||
process.exit();
|
||||
}
|
||||
@ -52,10 +52,17 @@ else if (cmd == "get-template")
|
||||
let getTemplate = async () => {
|
||||
let Esiur = (await import('../src/esiur.js')).default;
|
||||
await Esiur.Proxy.TemplateGenerator.getTemplate(url, dir, username, password, true);
|
||||
|
||||
process.exit();
|
||||
}
|
||||
|
||||
getTemplate();
|
||||
}
|
||||
else if (cmd == "version")
|
||||
{
|
||||
var pkg = require('../package.json');
|
||||
console.log(pkg.version);
|
||||
}
|
||||
|
||||
function getOption(args, option, abbreviation) {
|
||||
let index = args.indexOf(abbreviation);
|
||||
|
Reference in New Issue
Block a user