A Grunt task for detecting required modules and option to automatically install with npm.
npm install grunt-required --save-dev
Once that's done, add this line to your project's Gruntfile:
If the plugin has been installed correctly, running
grunt --help at the command line should list the newly-installed plugin's task or tasks. In addition, the plugin should be listed in package.json as a
devDependency, which ensures that it will be installed whenever the
npm install command is run.
In your project's Gruntfile, add a section named
required to the data object passed into
Set to true to have
npm install missing required modules.
[ /* list of Node.js core libs */ ]
Specify modules to ignore. By default it will ignore a list of core Node.js modules.
In lieu of a formal styleguide, take care to maintain the existing coding style. Lint and test your code using grunt.