UNPKG

2.3 kBMarkdownView Raw
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
12This plugin requires Grunt `~0.4.1`
13
14If 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
17npm install grunt-deps-ok --save-dev
18```
19
20Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
21
22```js
23grunt.loadNpmTasks('grunt-deps-ok');
24grunt.registerTask('default', ['deps-ok', rest of the tasks]);
25```
26
27That's it! Every time grunt runs, it will **quickly** check if all (normal, dev, peer) top
28level dependencies are present in the *node_modules* folder. It will also verify
29that the installed module versions are greater or equal to the ones declared inside *package.json* file.
30
31There are other modules that check npm dependencies, for example [grunt-check-modules](https://npmjs.org/package/grunt-check-modules).
32It seems to rely on `npm ls` command that takes a long time to go through the dependency tree.
33In my projects, *deps_ok* step takes less than 100ms, compared to 5-10 seconds for *grunt-check-modules*.
34
35## Small print
36
37Author: Gleb Bahmutov © 2013
38
39License: MIT - do anything with the code, but don't blame me if it does not work.
40
41Support: 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