Navigation Menu

Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Feb 21, 2019
1 parent 90c8eab commit 5b1a0d9
Showing 1 changed file with 43 additions and 12 deletions.
55 changes: 43 additions & 12 deletions readme.md
Expand Up @@ -13,30 +13,61 @@ some statistics about your package-lock.json
$ npm install -g lockspot
```

## universal options

### --file=\<path>
the package-lock.json to operate on.
it tries to do the right thing if you leave this blank:
• if you're piping something in on `STDIN`, it'll use that
• if there's a package-lock in the dir, it'll use that
• fall back to `STDIN`
you can use `-` to force consuming `STDIN`

## commands

### depcount

print the number of version of each dependency in the tree
count the number of different versions of each dependency in the tree

#### usage

```sh
$ lockspot depcount < package.json
$ <package-lock.json lockspot depcount
```

#### options

##### --file=\<path>
the package-lock.json to operate on.
it tries to do the right thing if you leave this blank:
• if you're piping something in on `STDIN`, it'll use that
• if there's a package-lock in the dir, it'll use that
• fall back to `STDIN`
you can use `-` to force consuming `STDIN`
##### --min=\<int>
only print dependencies that have more than this number of versions in the tree

#### --min=\<int>
only print dependencies that have more than this number of versions.
##### --prod
only count production (non-dev) dependencies

#### --sort=\<dont|count|name>
##### --pattern=\<pattern>
only count dependencies whose names match this pattern

##### --sort=\<dont|count|name>
how to sort the dependencies. `dont` is the default.

### flat

exit with a failure if the tree is not flat

#### usage

```sh
$ <package-lock.json lockspot flat
```

#### options

##### --prod
only count production (non-dev) dependencies

##### --pattern=\<pattern>
only count dependencies whose names match this pattern

<!--
##### --origami
set `production` to `true`, and `pattern` to `/@financial-times\/o-.*/`.
-->

0 comments on commit 5b1a0d9

Please sign in to comment.