Skip to content

Commit

Permalink
Add command line usage to README
Browse files Browse the repository at this point in the history
  • Loading branch information
marc136 committed Oct 3, 2019
1 parent 77d1947 commit 62446bb
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,29 @@ const options = {
</tbody>
</table>

## Command line usage
After installing it globally via
```
$ npm install -g folder-hash
```
You can use it like this:
```
# local folder
$ folder-hash -c config.json .
# local folder
$ folder-hash
# global folder
$ folder-hash /user/bin
```

It also allows to pass an optional JSON configuration file with the `-c` or `--config` flag, which should contain the same configuration as when using the JavaScript API.

You can also use a local version of folder-hash like this:
```
$ npx folder-hash --help
Use folder-hash on cli like this:
folder-hash [--config <json-file>] <file-or-folder>
```

## Examples
### Other examples using promises
Expand Down

0 comments on commit 62446bb

Please sign in to comment.