Use minimatch to filter installed npm modules by name.
###is a node module for matching strings against currently installed modules.
Inspired by Tyler Kellen's matchdep.
var matchmodule = require'matchmodule';matchmodulefilter'grunt-contrib*';
A globule compatible match pattern to filter dependencies.
Looks for install node modules in
node_modules, rather than parsing package.json.
I wanted to run grunt tasks from npm without adding them as dependencies, or without adding them to
Gruntfile.js. By adding the following line to
// load all installed grunt tasksrequire'matchmodule'filter'grunt-*'forEachgruntloadNpmTasks;;
I can now do something like the following if I want to run a one time grunt task:
npm install grunt-contrib-jshintgrunt jshint
Copyright (c) 2013 Patrick Williams. See LICENSE for further details.