pivotal-flow
Version:
🔀 A command-line tool that helps you manage & automate your workflow to use with PivotalTracker.
34 lines (33 loc) • 1.83 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const commander_1 = require("commander");
const help_1 = require("./commands/help");
const version_1 = __importDefault(require("./commands/version"));
(() => __awaiter(void 0, void 0, void 0, function* () {
const program = new commander_1.Command();
program.name('pivotal-flow').description(`Automate your pivotal workflow.`);
// add global options
program.version(yield version_1.default());
program.on('--help', () => console.log(help_1.getHelpOutput()));
// add commands
program.command('init', 'Set-up pivotal-flow', { executableFile: './commands/init/index' });
program
.command('hook <type>', 'Execute a hook (via husky)', { executableFile: './commands/hook/index' })
.command('start', 'Start working on a story', { executableFile: './commands/start/index', isDefault: true })
.alias('s');
// parse at the end
program.parse(process.argv);
}))();