Skip to content

Commit bf03d5f

Browse files
authored
Update README.md
1 parent f225331 commit bf03d5f

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ The last library you'll ever need for building intuitive, robust and flexible CL
2828
- [Custom help handlers](#custom-help-handlers)
2929
- [Custom version handlers](#custom-version-handlers)
3030
- [Exception handling](#exception-handling)
31+
- [Contributing](#contributing)
3132

3233
# Installation
3334
```
@@ -624,3 +625,23 @@ class DuplicateCommandNameException extends CillyException
624625
class NoArgsAndSubCommandsException extends CillyException
625626
class ValidationError extends CillyException
626627
```
628+
629+
# Contributing
630+
Contributions are greatly appreciated and lovingly welcomed!
631+
In your pull request, make sure to link the issue you're addressing. If no issue exists, make one first so we have a chance to discuss it first.
632+
633+
Always write tests for the functionality you add or change. See the `cli-command.test.ts` and `token-parser.test.ts` files for examples.
634+
As always, use the linter provided in the project (`.eslintrc.json`) and stick to the coding style of the project.
635+
636+
## Setup
637+
1. Install everything with `npm i`
638+
2. Run tests with `npm test`
639+
640+
## Debugging
641+
When debugging, take not that both `parse()` and `process()` strip the two first arguments off of `process.argv` when invoked.
642+
When you want to see how an input would be parsed, set the `raw` option in `parse()` and `process()`:
643+
```typescript
644+
const { args, opts, extra } = new CliCommand('build').parse(['build', '--unknown-option'], { raw: true })
645+
```
646+
When `raw` is `true`, the input array is not changed.
647+
The `.vscode/launch.json` file contains a configuration for debugging the test files `Mocha Tests`, allowing you to put breakpoints and step through your tests.

0 commit comments

Comments
 (0)