@titan-suite/cli
Version:
The complete smart contract development tool
30 lines (29 loc) • 954 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const command_1 = require("@oclif/command");
const utils_1 = require("../utils");
class Create extends command_1.Command {
run() {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const { args } = this.parse(Create);
const { type, boltName } = args;
if (type && boltName) {
yield utils_1.createTemplate(type, boltName);
}
else {
this.log('Please specify a correct type');
}
});
}
}
Create.description = 'Initialize new template contracts and tests';
Create.examples = [
'$ titan create contract <BoltName>',
'$ titan create test <BoltName>',
];
Create.flags = {
help: command_1.flags.help({ char: 'h' }),
};
Create.args = [{ name: 'type' }, { name: 'boltName' }];
exports.default = Create;