From 5b1a0d9471c4ab79af1aa5db4cc023a3ced221b0 Mon Sep 17 00:00:00 2001 From: chee Date: Thu, 21 Feb 2019 02:09:25 +0000 Subject: [PATCH] Update readme.md --- readme.md | 55 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/readme.md b/readme.md index c2f7397..739a1d6 100644 --- a/readme.md +++ b/readme.md @@ -13,30 +13,61 @@ some statistics about your package-lock.json $ npm install -g lockspot ``` +## universal options + +### --file=\ +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 +$ -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=\ +only print dependencies that have more than this number of versions in the tree -#### --min=\ -only print dependencies that have more than this number of versions. +##### --prod +only count production (non-dev) dependencies -#### --sort=\ +##### --pattern=\ +only count dependencies whose names match this pattern + +##### --sort=\ how to sort the dependencies. `dont` is the default. + +### flat + +exit with a failure if the tree is not flat + +#### usage + +```sh +$ +only count dependencies whose names match this pattern + +