UNPKG

quick-publish

Version:

Shipped a standard `npm publish` workflow with one click.

37 lines 1.13 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.bootstrapCli = void 0; /** * Module dependencies */ const cac_1 = __importDefault(require("cac")); const index_1 = require("./index"); /** * Bootstrap publish cli. */ function bootstrapCli() { const cli = (0, cac_1.default)(); const pkg = require('../package.json'); cli .command('', pkg.description) .option('--depcost', 'Generate or update `DEPCOST.md`, defaults to `false`') .option('--push', 'Execute git push & tag push to remote git origin, defaults to `true`') .action(opts => { (0, index_1.publish)(opts); }); /** * Display help message when `-h` or `--help` appears */ cli.help(); /** * Display version number when `-v` or `--version` appears * It's also used in help message */ cli.version(pkg.version); cli.parse(); } exports.bootstrapCli = bootstrapCli; //# sourceMappingURL=cli.js.map