1 | # grunt-deps-ok
|
2 |
|
3 | > Quickly checks if top level dependencies are missing or out of date using [deps-ok](https://github.com/bahmutov/deps-ok)
|
4 |
|
5 | [![NPM info][nodei.co]](https://npmjs.org/package/grunt-deps-ok)
|
6 |
|
7 | [![Build status][ci-image]][ci-url]
|
8 | [![dependencies][dependencies-image]][dependencies-url]
|
9 | [![endorse][endorse-image]][endorse-url]
|
10 |
|
11 | ## Getting Started
|
12 | This plugin requires Grunt `~0.4.1`
|
13 |
|
14 | If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
|
15 |
|
16 | ```shell
|
17 | npm install grunt-deps-ok --save-dev
|
18 | ```
|
19 |
|
20 | Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
|
21 |
|
22 | ```js
|
23 | grunt.loadNpmTasks('grunt-deps-ok');
|
24 | grunt.registerTask('default', ['deps-ok', rest of the tasks]);
|
25 | ```
|
26 |
|
27 | That's it! Every time grunt runs, it will **quickly** check if all (normal, dev, peer) top
|
28 | level dependencies are present in the *node_modules* folder. It will also verify
|
29 | that the installed module versions are greater or equal to the ones declared inside *package.json* file.
|
30 |
|
31 | There are other modules that check npm dependencies, for example [grunt-check-modules](https://npmjs.org/package/grunt-check-modules).
|
32 | It seems to rely on `npm ls` command that takes a long time to go through the dependency tree.
|
33 | In my projects, *deps_ok* step takes less than 100ms, compared to 5-10 seconds for *grunt-check-modules*.
|
34 |
|
35 | ## Small print
|
36 |
|
37 | Author: Gleb Bahmutov © 2013
|
38 |
|
39 | License: MIT - do anything with the code, but don't blame me if it does not work.
|
40 |
|
41 | Support: if you find any problems with this module, email / tweet / open issue on Github
|
42 |
|
43 | [ci-image]: https://travis-ci.org/bahmutov/grunt-deps-ok.png?branch=master
|
44 | [ci-url]: https://travis-ci.org/bahmutov/grunt-deps-ok
|
45 | [nodei.co]: https://nodei.co/npm/grunt-deps-ok.png?downloads=true
|
46 | [dependencies-image]: https://david-dm.org/bahmutov/grunt-deps-ok.png
|
47 | [dependencies-url]: https://david-dm.org/bahmutov/grunt-deps-ok
|
48 | [endorse-image]: https://api.coderwall.com/bahmutov/endorsecount.png
|
49 | [endorse-url]: https://coderwall.com/bahmutov |
\ | No newline at end of file |