JSPM

  • Created
  • Published
  • Downloads 78030
  • Score
    100M100P100Q38727F
  • License BSD

checks which modules you have used in your code and then makes sure they are listed as dependencies in your package.json

Package Exports

  • dependency-check

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 (dependency-check) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

dependency-check

checks which modules you have used in your code and then makes sure they are listed as dependencies in your package.json

dat

usage

npm install dependency-check -g
dependency-check <package.json file or module folder path>

dependency-check will exit with code 1 if there are missing dependencies, in addition to printing them out

auto check before every npm publish

add this to your .bash_profile/.bashrc

# https://gist.github.com/mafintosh/405048d304fbabb830b2
npm () {
  if [ "$1" = "publish" ]; then
    dependency-check . &&  $(which npm) "$*"
  else
    $(which npm) "$*"
  fi
}

now when you do npm publish and you have missing dependencies it won't publish, e.g.:

$ npm publish
Dependencies not listed in package.json: siblings
$ npm install --save siblings
$ npm publish # works this time