JSPM

@webkits/depcheck

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 10
  • Score
    100M100P100Q41058F
  • License MIT

A small package to find duplicate dependencies in your node_modules that helps to analyze your packages.

Package Exports

  • @webkits/depcheck
  • @webkits/depcheck/depcheck.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@webkits/depcheck) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

depcheck (dependency-checker)

depcheck is a small package to find duplicate dependencies in your node_modules. This project is inspired by find-duplicate-dependencies by Vladimir Guguiev.

Install

$ npm install @webkits/depcheck

Usage

CLI

depcheck [options] [package-name-1] [...] [package-name-n]

Analyze and find the duplicates packages in node_modules. If no package names
are provided, it will check all the dependencies.

Options:
      --version  Show version number                                   [boolean]
  -v, --verbose  Display the duplicate packages in details with their version
                 and caller path                                       [boolean]
  -h, --help     Show help                                             [boolean]

This command exits with 1 if there are some duplicates and with 0 if there are not.

Example 1: Check all the dependencies

$ depcheck

Example 2: Check some dependecies

$ depcheck -v lodash react

API

const findDuplicateDependencies = require('@webkits/depcheck');

findDuplicateDependencies()
  .then(duplicates => console.log(JSON.stringify(duplicates)))
     .catch(err => {
      console.error(err.stack);
      return process.exit(1);
    });