UNPKG

1.08 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const command_1 = require("@oclif/command");
4const simpleGit = require('simple-git');
5class Init extends command_1.Command {
6 async run() {
7 const { args, flags } = this.parse(Init);
8 const name = flags.name || 'world';
9 simpleGit().outputHandler((command, stdout, stderr) => {
10 stdout.pipe(process.stdout);
11 stderr.pipe(process.stderr);
12 }).clone("git@gitlab.alternation.hr:open-source/servant-starter-kit.git");
13 if (args.file && flags.force) {
14 this.log(`you input --force and --file: ${args.file}`);
15 }
16 }
17}
18Init.description = 'describe the command here';
19Init.flags = {
20 help: command_1.flags.help({ char: 'h' }),
21 // flag with a value (-n, --name=VALUE)
22 name: command_1.flags.string({ char: 'n', description: 'name to print' }),
23 // flag with no value (-f, --force)
24 force: command_1.flags.boolean({ char: 'f' }),
25};
26Init.args = [{ name: 'file' }];
27exports.default = Init;