{"_id":"usually","_rev":"300031","name":"usually","description":"Prints Usage For Node.JS Command-Line Applications.","dist-tags":{"latest":"1.2.0"},"maintainers":[{"name":"zvr","email":""}],"time":{"modified":"2024-01-31T16:06:10.000Z","created":"2018-06-09T09:27:14.019Z","1.2.0":"2019-04-12T19:02:03.966Z","1.1.0":"2018-12-04T03:33:32.662Z","1.0.0":"2018-06-09T09:27:14.019Z"},"users":{},"author":{"name":"Anton","email":"anton@adc.sh"},"repository":{"type":"git","url":"git://github.com/artdecocode/usually.git"},"versions":{"1.2.0":{"name":"usually","version":"1.2.0","description":"Prints Usage For Node.JS Command-Line Applications.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","test-build":"ALAMODE_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test --watch","lint":"eslint .","e":"alanode","example/":"yarn e example/example.js","doc":"NODE_DEBUG=doc doc documentary -o README.md","d":"yarn-s d1 externs","d1":"typal src/index.js -c","externs":"typal externs.js -e","build":"yarn-s d b doc","b":"alamode src -o build -s"},"externs":"externs.js","repository":{"type":"git","url":"git://github.com/artdecocode/usually.git"},"keywords":["cli","usage","help","bin","binary","usually"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/usually/issues"},"homepage":"https://github.com/artdecocode/usually#readme","devDependencies":{"alamode":"^1.9.3","documentary":"^1.23.4","eslint-config-artdeco":"1.0.1","snapshot-context":"^2.2.2","yarn-s":"1.1.0","zoroaster":"^3.11.5"},"licenseText":"MIT License\n\nCopyright (c) 2019 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"usually@1.2.0","dist":{"shasum":"ce4d8ea87875599bbfb3af48692595a3114f618f","size":4123,"noattachment":false,"key":"/usually/-/usually-1.2.0.tgz","tarball":"http://name.csiicloud.com:7001/usually/download/usually-1.2.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/usually_1.2.0_1555095723803_0.6751066984862588"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:10.095Z","publish_time":1555095723966,"_cnpm_publish_time":1555095723966},"1.1.0":{"name":"usually","version":"1.1.0","description":"Print usage of a Node.js command-line application.","main":"build","scripts":{"t":"zoroaster -a","test":"yarn t test/spec test/mask","test-build":"ALAMODE_ENV=test-build yarn test","test-all":"yarn-s test test-build","test-watch":"yarn test --watch","lint":"eslint .","e":"node example","example/":"yarn e example/example.js","doc":"NODE_DEBUG=doc doc documentary -o README.md","d":"yarn-s d1","d1":"doc src/index.js -g","build":"yarn-s d b doc","b":"alamode src -o build -s"},"repository":{"type":"git","url":"git://github.com/artdecocode/usually.git"},"keywords":["cli","usage","help","bin","binary","usually"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/usually/issues"},"homepage":"https://github.com/artdecocode/usually#readme","devDependencies":{"alamode":"1.6.0","documentary":"1.20.1","eslint":"4.19.1","eslint-config-artdeco":"1.0.0","snapshot-context":"2.0.1","yarn-s":"1.1.0","zoroaster":"3.6.6"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"usually@1.1.0","dist":{"shasum":"c79965c264596cd3ead181f84dae64dee24b60d6","size":3482,"noattachment":false,"key":"/usually/-/usually-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/usually/download/usually-1.1.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/usually_1.1.0_1543894412535_0.8212895420580908"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:09.221Z","publish_time":1543894412662,"_cnpm_publish_time":1543894412662},"1.0.0":{"name":"usually","version":"1.0.0","description":"Print usage of a Node.js command-line application.","main":"build","scripts":{"t":"zoroaster -b","test":"yarn t test/spec","test-build":"BABEL_ENV=test-build yarn t test/spec","test-all":"yarn-s test test-build","test-watch":"yarn test --watch","lint":"eslint .","e":"node example","example/":"yarn e example/example.js","build":"babel src --out-dir build --source-maps"},"files":["build"],"repository":{"type":"git","url":"git://github.com/artdecocode/usually.git"},"keywords":["cli","usage","help","bin","binary","usually"],"author":{"name":"Anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/usually/issues"},"homepage":"https://github.com/artdecocode/usually#readme","devDependencies":{"@babel/cli":"7.0.0-beta.49","@babel/core":"7.0.0-beta.49","@babel/plugin-syntax-object-rest-spread":"7.0.0-beta.49","@babel/plugin-transform-modules-commonjs":"7.0.0-beta.49","@babel/register":"7.0.0-beta.49","babel-plugin-transform-rename-import":"2.2.0","eslint":"4.19.1","eslint-config-artdeco":"1.0.0","snapshot-context":"2.0.1","yarn-s":"1.1.0","zoroaster":"2.1.0"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"usually@1.0.0","dist":{"shasum":"3ace5b09471ddf35cccca85971ca178b5255d4b0","size":4114,"noattachment":false,"key":"/usually/-/usually-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/usually/download/usually-1.0.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/usually_1.0.0_1528536433932_0.44708921798180046"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:08.358Z","publish_time":1528536434019,"_cnpm_publish_time":1528536434019}},"readme":"# usually\n\n[![npm version](https://badge.fury.io/js/usually.svg)](https://npmjs.org/package/usually)\n\n_Usually_ Will Generate Usage Of Node.JS Command-Line Applications. It is compatible with [_Argufy_](https://artdecocode.com/argufy/) which can save arguments in the `arguments.xml` file, and extract them with auto-generated JavaScript compatible with _Google Closure Compiler_.\n\n```sh\nyarn add -E usually\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/0.svg?sanitize=true\"></a></p>\n\n\n## Table Of Contents\n\n- [Table Of Contents](#table-of-contents)\n- [API](#api)\n- [`usually(config: Config): string`](#usuallyconfig-config-string)\n  * [`_usually.Config`](#type-_usuallyconfig)\n- [Argufy Integration](#argufy-integration)\n- [Copyright](#copyright)\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/1.svg?sanitize=true\"></a></p>\n\n## API\n\nThe package is available by importing its default function:\n\n```js\nimport usually from 'usually'\n```\n\nThe types and [externs](externs.js) for _Google Closure Compiler_ via [**_Depack_**](https://github.com/dpck/depack) are defined in the `_usually` namespace.\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/2.svg?sanitize=true\"></a></p>\n\n## `usually(`<br/>&nbsp;&nbsp;`config: Config,`<br/>`): string`\n\nCreate a string to display as a help message.\n\n__<a name=\"type-_usuallyconfig\">`_usually.Config`</a>__: The configuration object.\n\n|    Name     |              Type               |                               Description                               |\n| ----------- | ------------------------------- | ----------------------------------------------------------------------- |\n| __usage*__  | _!Object&lt;string, string&gt;_ | The map with possible arguments (flags, options) and their information. |\n| description | _string_                        | What does the program do?                                               |\n| line        | _string_                        | The summary of the program in one line.                                 |\n| example     | _string_                        | The example of the program usage.                                       |\n\n```js\nimport usually from 'usually'\n\nconst res = usually({\n  usage: {\n    '-h': 'print help',\n    '-c': 'execute this command',\n  },\n  description: 'A test command-line application',\n  line: 'usually [-c command|command2] [-h]',\n  example: 'usually -c command2',\n})\n\nconsole.log(res)\n```\n```fs\nA test command-line application\n\n  usually [-c command|command2] [-h]\n\n\t-h\tprint help\n\t-c\texecute this command\n\n  Example:\n\n    usually -c command2\n```\n\n---\n\nThe algorithm will tab the usage object and all new lines will appear indented to the required padding.\n\n```js\nimport usually from 'usually'\n\nconst res = usually({\n  usage: {\n    '-h': 'print help',\n    '-c': `execute this command, that will perform\nthe operations on the CPU and return result\nupon the full execution or terminate after\n30s of inactivity.`,\n  },\n  description: 'Run the usually',\n})\n```\n```fs\nRun the usually\n\n\t-h\tprint help\n\t-c\texecute this command, that will perform\n\t  \tthe operations on the CPU and return result\n\t  \tupon the full execution or terminate after\n\t  \t30s of inactivity.\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/3.svg?sanitize=true\"></a></p>\n\n## Argufy Integration\n\n_Argufy_ is a program that manages arguments for CLI programs by storing them in a separate XML file so that they are readily updatable in both source code and README documentation. It also generates the script that extracts those arguments and works with _Google Closure Compiler_. [Read More](https://github.com/artdecocode/argufy#usually-integration).\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/4.svg?sanitize=true\"></a></p>\n\n## Copyright\n\n(c) [Art Deco][1] 2019\n\n[1]: https://artd.eco\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/-1.svg?sanitize=true\"></a></p>","_attachments":{},"homepage":"https://github.com/artdecocode/usually#readme","bugs":{"url":"https://github.com/artdecocode/usually/issues"},"license":"MIT"}