Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcollina/help-me
Help command for node, partner of minimist and commist
https://github.com/mcollina/help-me
Last synced: 4 days ago
JSON representation
Help command for node, partner of minimist and commist
- Host: GitHub
- URL: https://github.com/mcollina/help-me
- Owner: mcollina
- License: mit
- Created: 2014-12-04T16:40:50.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-02-12T09:07:44.000Z (10 months ago)
- Last Synced: 2024-12-09T11:26:52.019Z (14 days ago)
- Language: JavaScript
- Size: 37.1 KB
- Stars: 14
- Watchers: 3
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
help-me
=======Help command for node, to use with [minimist](http://npm.im/minimist) and [commist](http://npm.im/commist).
Example
-------```js
'use strict'var helpMe = require('help-me')
var path = require('path')
var help = helpMe({
dir: path.join(__dirname, 'doc'),
// the default
ext: '.txt'
})help
.createStream(['hello']) // can support also strings
.pipe(process.stdout)// little helper to do the same
help.toStdout(['hello'])
```Using ESM and top-level await::
```js
import { help } from 'help-me'
import { join } from 'desm'await help({
dir: join(import.meta.url, 'doc'),
// the default
ext: '.txt'
}, ['hello'])
```Usage with commist
------------------[Commist](http://npm.im/commist) provide a command system for node.
```js
var commist = require('commist')()
var path = require('path')
var help = require('help-me')({
dir: path.join(__dirname, 'doc')
})commist.register('help', help.toStdout)
commist.parse(process.argv.splice(2))
```Acknowledgements
----------------This project was kindly sponsored by [nearForm](http://nearform.com).
License
-------MIT