Build Status Code Climate Gem Version

npmdc

Screenshot

NPM Dependency Checker is a simple tool which can check for missed dependencies based on your package.json file.

Sponsored by Evil Martians

Installation

Add this line to your application's Gemfile:

gem 'npmdc'

And then execute:

$ bundle

Or install it yourself as:

$ gem install npmdc

Usage

Rails

YourApp::Application.configure do
  config.npmdc.path   = "/path/to/your/frontend/code/dir" # `Rails.root` by default
  config.npmdc.format = "doc"                             # `short`, `doc`, `progress`. `short` by default
  config.npmdc.color  = false                             # `true` by default
  config.npmdc.types  = ["dependencies"]                  # `["dependencies", "devDependencies"]` by default
end

CLI tool:

$ bundle exec npmdc [options]

Options:

  • --path PATH - Path to frontend code

  • --color - Disable color formatting of output

  • -f, --format FORMAT - Set format of output

  • -t, --types dependencies devDependencies - Dependency types to check

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/lysyi3m/npmdc.

License

The gem is available as open source under the terms of the MIT License.