grunt-deps-ok
Quickly checks if top level dependencies are missing or out of date
Last updated 5 years ago by bahmutov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install grunt-deps-ok 
SYNC missed versions from official npm registry.

grunt-deps-ok

Quickly checks if top level dependencies are missing or out of date using deps-ok

NPM info

Build status dependencies endorse semantic-release manpm

Getting Started and Install

This plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-deps-ok --save-dev

Configuration

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-deps-ok');
grunt.registerTask('default', ['deps-ok', rest of the tasks]);

That's it! Every time grunt runs, it will quickly check if all (normal, dev, peer) top level dependencies are present in the node_modules folder. It will also verify that the installed module versions are greater or equal to the ones declared inside package.json file.

You can configure further by providing options

// Gruntfile.js
'deps-ok': {
  options: {
    verbose: true,
    force: true // print error message, but pass the task
    skipBower: false, // do not check bower.json even if exists
    folder: 'path/to/folder/with/package.json' // options, by default current folder
  }
}

There are other modules that check npm dependencies, for example grunt-check-modules. It seems to rely on npm ls command that takes a long time to go through the dependency tree. In my projects, deps_ok step takes less than 100ms, compared to 5-10 seconds for grunt-check-modules.

Small print

Author: Gleb Bahmutov © 2013

License: MIT - do anything with the code, but don't blame me if it does not work.

Support: if you find any problems with this module, email / tweet / open issue on Github

Current Tags

  • 0.9.0                                ...           latest (5 years ago)

22 Versions

  • 0.9.0                                ...           5 years ago
  • 0.8.0                                ...           6 years ago
  • 0.7.1                                ...           6 years ago
  • 0.7.0                                ...           6 years ago
  • 0.6.0                                ...           6 years ago
  • 0.5.2                                ...           6 years ago
  • 0.5.1                                ...           6 years ago
  • 0.5.0                                ...           6 years ago
  • 0.4.2                                ...           6 years ago
  • 0.4.1                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.0                                ...           7 years ago
  • 0.1.8                                ...           7 years ago
  • 0.1.7                                ...           7 years ago
  • 0.1.6                                ...           7 years ago
  • 0.1.5                                ...           7 years ago
  • 0.1.4                                ...           7 years ago
  • 0.1.3                                ...           7 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago

Copyright 2014 - 2016 © taobao.org |