Skip to content

Commit

Permalink
pass argv to gather dependency versions (look forward to regretting t…
Browse files Browse the repository at this point in the history
…his)
  • Loading branch information
chee committed Feb 21, 2019
1 parent e240c37 commit 305d3cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion commands/depcount.js
Expand Up @@ -20,6 +20,12 @@ export let builder = yargs => {
choices: ["dont", "count", "name"],
describe: "how to sort the dependencies"
})
.options("production", {
alias: ["prod", "p"],
type: "boolean",
default: "false",
describe: "only count the production (non-dev) tree"
})
.options("show")
.check(argv => {
if (!(Number.isInteger(argv.min) && argv.min >= 0)) {
Expand Down Expand Up @@ -47,7 +53,7 @@ let minFilter = min => ([, count]) =>
export async function handler (argv) {
let lockfile = await getLockfile(argv)

let versions = await gatherDependencyVersions()(lockfile.dependencies)
let versions = await gatherDependencyVersions(argv)(lockfile.dependencies)
let longestName = await getLongestName()(lockfile.dependencies)

Object.entries(versions)
Expand Down

0 comments on commit 305d3cd

Please sign in to comment.