Skip to content

chengcyber/scan-deps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

util to detect undeclared deps and phantom deps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published