UNPKG

@titan-suite/cli

Version:

The complete smart contract development tool

37 lines (36 loc) 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const command_1 = require("@oclif/command"); const inquirer_1 = require("inquirer"); const index_1 = require("../utils/index"); class Unpack extends command_1.Command { run() { return tslib_1.__awaiter(this, void 0, void 0, function* () { const { args } = this.parse(Unpack); if (args.pack) { yield index_1.downloadPack(args.pack, `titan-${args.pack}`); } else { let promptQuestions = [{ type: 'list', name: 'selected_pack', message: 'Choose a pack to download', choices: ['react', 'react-native', 'default'], }]; const answer = yield inquirer_1.prompt(promptQuestions); yield index_1.downloadPack(answer.selected_pack, `titan-${answer.selected_pack}`); } }); } } Unpack.description = 'Start a new project with a pre-built dApp'; Unpack.examples = [ '$ titan unpack', '$ titan unpack <name>', ]; Unpack.flags = { help: command_1.flags.help({ char: 'h' }), }; Unpack.args = [{ name: 'pack' }]; exports.default = Unpack;