File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11#!/usr/bin/env node
22
33// const { getPackagesUsages } = require('pkg-usage');
4- const { Command } = require ( 'commander' ) ;
54const { getPackagesUsages } = require ( '../dist/src' ) ;
5+ const { Command } = require ( 'commander' ) ;
66
77const program = new Command ( ) ;
88
@@ -20,10 +20,15 @@ program
2020 '-f, --file-globs <value>' ,
2121 'Files to analyze based on file globs ex: -f "**/*.(ts|tsx)" or --file-globs="**/*.(js|jsx)"'
2222 )
23- . action ( ( { packages, fileGlobs } ) => {
23+ . option (
24+ '-cwd, --package-json-CWD <value>' ,
25+ 'Directory to start from ex: -cwd "/path/to/start/from"'
26+ )
27+ . action ( ( { packages, fileGlobs, packageJsonCWD } ) => {
2428 const usages = getPackagesUsages ( {
2529 packages,
2630 fileGlobs,
31+ packageJsonCWD,
2732 } ) ;
2833
2934 console . log ( JSON . stringify ( usages , undefined , 2 ) ) ;
You can’t perform that action at this time.
0 commit comments