{"_id":"commander-version","_rev":"139691","name":"commander-version","description":"A wrapper for Commander that automatically sets the version based on your package.json","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"time":{"modified":"2021-06-03T11:26:08.000Z","created":"2020-09-09T03:48:50.603Z","2.0.0":"2021-04-18T20:28:22.270Z","1.1.0":"2020-09-14T03:32:56.080Z","1.0.1":"2020-09-09T04:56:08.717Z","1.0.0":"2020-09-09T03:48:50.603Z"},"users":{},"author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/commander-version.git"},"versions":{"2.0.0":{"name":"commander-version","version":"2.0.0","description":"A wrapper for Commander that automatically sets the version based on your package.json","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/commander-version","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/commander-version.git"},"keywords":["commander","version","set","package","json","pkg","plugin"],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn run build","test":"node ./test/default.test.js -h && node ./test/commander.test.js -h && node ./test/create-command.test.js"},"dependencies":{"@bconnorwhite/module":"^2.0.2","commander":"^7.2.0"},"devDependencies":{"@bconnorwhite/bob":"^2.1.0"},"_id":"commander-version@2.0.0","dist":{"shasum":"861c74259b7e973ca8218c5e1252c5ba39d66e45","size":2558,"noattachment":false,"key":"/commander-version/-/commander-version-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/commander-version/download/commander-version-2.0.0.tgz"},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/commander-version_2.0.0_1618777702123_0.6378776502910217"},"_hasShrinkwrap":false,"publish_time":1618777702270,"_cnpm_publish_time":1618777702270},"1.1.0":{"name":"commander-version","version":"1.1.0","description":"A wrapper for Commander that automatically sets the version based on your package.json","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/commander-version","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/commander-version.git"},"keywords":["commander","version","set","package","json","pkg","plugin"],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn run build","test":"node ./test/default.test.js -h && node ./test/commander.test.js -h && node ./test/create-command.test.js"},"dependencies":{"@bconnorwhite/module":"^2.0.2","commander":"^6.1.0"},"devDependencies":{"@bconnorwhite/bob":"^2.1.0"},"_id":"commander-version@1.1.0","dist":{"shasum":"fbfaea4632921a42f8f855f96bcaa3d9920a6296","size":2399,"noattachment":false,"key":"/commander-version/-/commander-version-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/commander-version/download/commander-version-1.1.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/commander-version_1.1.0_1600054375985_0.287447367643789"},"_hasShrinkwrap":false,"publish_time":1600054376080,"_cnpm_publish_time":1600054376080},"1.0.1":{"name":"commander-version","version":"1.0.1","description":"A wrapper for Commander that automatically sets the version based on your package.json","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/commander-version","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/commander-version.git"},"keywords":["commander","version","set","package","json","pkg","plugin"],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn run build","test":"node ./test/default.test.js -h && node ./test/commander.test.js -h"},"dependencies":{"@bconnorwhite/module":"^2.0.2","commander":"^6.1.0"},"devDependencies":{"@bconnorwhite/bob":"^2.1.0"},"_id":"commander-version@1.0.1","dist":{"shasum":"ba35a4d8d34b1869d45ce546d69a5add71d493f4","size":2312,"noattachment":false,"key":"/commander-version/-/commander-version-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/commander-version/download/commander-version-1.0.1.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/commander-version_1.0.1_1599627368593_0.5968892077497749"},"_hasShrinkwrap":false,"publish_time":1599627368717,"_cnpm_publish_time":1599627368717},"1.0.0":{"name":"commander-version","version":"1.0.0","description":"A wrapper for Commander that automatically sets the version based on your package.json","license":"MIT","author":{"name":"Connor White","email":"connor.bcw@gmail.com","url":"https://connorwhite.org"},"homepage":"https://connorwhite.org/github/commander-version","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/commander-version.git"},"keywords":[],"main":"./build/index.js","scripts":{"build":"bob build","postversion":"git push","prepublishOnly":"yarn run build"},"dependencies":{"@bconnorwhite/module":"^2.0.2","commander":"^6.1.0"},"devDependencies":{"@bconnorwhite/bob":"^2.1.0"},"_id":"commander-version@1.0.0","dist":{"shasum":"5fd4afc452955e2f87f30b34e63ad8d6a9809aac","size":2215,"noattachment":false,"key":"/commander-version/-/commander-version-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/commander-version/download/commander-version-1.0.0.tgz"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/commander-version_1.0.0_1599623330445_0.9618909615132754"},"_hasShrinkwrap":false,"publish_time":1599623330603,"_cnpm_publish_time":1599623330603}},"readme":"<div align=\"center\">\n  <h1>commander-version</h1>\n  <a href=\"https://npmjs.com/package/commander-version\">\n    <img alt=\"npm\" src=\"https://img.shields.io/npm/v/commander-version.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/commander-version\">\n    <img alt=\"typescript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/commander-version.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/commander-version\">\n    <img alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/commander-version?label=Stars%20Appreciated%21&style=social\">\n  </a>\n  <a href=\"https://twitter.com/bconnorwhite\">\n    <img alt=\"Twitter Follow\" src=\"https://img.shields.io/twitter/follow/bconnorwhite.svg?label=%40bconnorwhite&style=social\">\n  </a>\n</div>\n\n<br />\n\n> A wrapper for Commander that automatically sets the version based on your package.json.\n\n## Installation\n\n```bash\nyarn add commander-version\n```\n\n```bash\nnpm install commander-version\n```\n\n## API\n\n### Default\n\n> Note: also capitalizes 'help' and 'version' descriptions by default.\n\nTo set the version, import `program` the same as you would for Commander, just pass `__dirname`:\n\n```ts\nimport program from \"commander-version\";\n\nprogram(__dirname)\n  .name(\"my-program\")\n  .description(\"...\")\n  // ...\n  .parse();\n```\n\nThis creates a new Command rather than using the global Command, which can cause issues.\n\n##\n\n### Flags and Description\n\nYou can also add flags or descriptions the same as with `program.version()`:\n\n> Note: the default flags are set to \"-v --version\" to be inline with other programs, such as Node.js.\n\n```ts\nimport program from \"commander-version\";\n\n// To set flags back to the Commander default of \"-V --version\", for example:\n\nprogram(__dirname, \"-V --version\", \"custom version description\")\n  .name(\"my-program\")\n  .description(\"...\")\n  // ...\n  .parse();\n```\n\n##\n\n### Types\n\nFor creating types, the Commander namespace can also be imported:\n\n```ts\nimport { commander } from \"commander-version\";\n\ntype MyType = commander.Command;\n```\n\n##\n\n### Commander\n\nFor convenience, Commander and createCommand can also be used without setting the version:\n\n```ts\nimport { commander, createCommand } from \"commander-version\";\n\nnew commander.Command(\"my-command\")\n  .description(\"...\")\n  // ...\n\nconst myCommand = createCommand(\"my-command\")\n  .description(\"...\")\n  // ...\n```\n\n<br />\n\n<h2>Dependencies<img align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/david/bconnorwhite/commander-version.svg\"></h2>\n\n- [@bconnorwhite/module](https://www.npmjs.com/package/@bconnorwhite/module): Read your module's package.json without importing it\n- [commander](https://www.npmjs.com/package/commander): the complete solution for node.js command-line programs\n\n<br />\n\n<h2>Dev Dependencies<img align=\"right\" alt=\"David\" src=\"https://img.shields.io/david/dev/bconnorwhite/commander-version.svg\"></h2>\n\n- [@bconnorwhite/bob](https://www.npmjs.com/package/@bconnorwhite/bob): Bob is a toolkit for TypeScript projects\n\n<br />\n\n<h2>License <img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/commander-version.svg\"></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n\n## Related Packages\n\n- [@bconnorwhite/module](https://www.npmjs.com/package/@bconnorwhite/module): Read your module's package.json without importing it\n","_attachments":{},"homepage":"https://connorwhite.org/github/commander-version","license":"MIT"}