0.2.0 • Published 9 months ago

scan-deps v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

scan-deps

util to detect undeclared deps and phantom deps

Usage

  1. CLI
npx scan-deps
Usage: scan-deps [options]

Options:
  -V, --version  output the version number
  --json         output as json
  --debug        turn on debug log
  --all          output all dependencies includes detected
                 dependencies
  --directory    directory included, default: src,lib
  --extension    included file extensions, default:
                 ts,js,tsx,jsx
  -h, --help     display help for command
  1. Node API
import { scanDeps } from "scan-deps";

async function main() {
  const { detectedDependencies, missingDependencies, unusedDependencies } =
    await scanDeps({
      // cwd: process.cwd(),
      // directory: 'src,lib',
      // extension: 'ts,js,tsx,jsx',
    });
}

Development

yarn install
yarn build:watch

LICENSE

MIT @chengcyber