-
Notifications
You must be signed in to change notification settings - Fork 106
Home
Lloyd Brookes edited this page Mar 26, 2020
·
58 revisions
Get started by looking at the API documentation. There are two things you need to learn - the commandLineArgs
function (exported by this module) and the OptionDefinition
object it accepts as input.
- API reference
- Notation rules
- Validation
- Usage guide generator
- How to use with native ECMAScript modules
- How to use with rollup
To try out command-line-args, follow the instructions in Typical usage.
More detail and examples regarding the options you can pass to commandLineArgs
.
Examples of various option definition features.
Miscellaneous other examples.
- Typical usage
- Usage in a mocha test script
-
How to implement a negating flag (e.g.
--no-something
)