Project

npmdc

0.03
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Check for missed dependencies of NPM packages based on dependency list specified in package.json file.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
>= 4.2
~> 10.0
~> 3.0

Runtime

~> 0.8.1
> 0.18
 Project Readme

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', group: :development

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
  config.npmdc.environments     = ["development"]                   # `development` only by default
  config.npmdc.abort_on_failure = true                              # 'false' by default
end

CLI tool:

$ bundle exec npmdc [options]

Options:

      [--path=PATH]            # Path to package.json config
      [--color], [--no-color]  # Enable color
                               # Default: true
  t, [--types=one two three]   # types for check
                               # Default: ["dependencies", "devDependencies"]
                               # Possible values: dependencies, devDependencies
  f, [--format=FORMAT]         # Output format
                               # Possible values: progress, doc, short

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.