matchdep 0.3.0

Use globule to filter npm module dependencies by name.

Platform: npm

Language: JavaScript

License: MIT

Repository: https://github.com/tkellen/node-matchdep

View on registry: https://www.npmjs.com/package/matchdep/

Install: npm install matchdep


matchdep Build Status

Use globule to filter npm module dependencies by name.

NPM

Examples

var matchdep = require('matchdep');
// Filter dependencies (by autoloading nearest package.json)
matchdep.filter('mini*');
// Filter devDependencies (with config string indicating file to be required)
matchdep.filterDev('grunt-contrib-*', './package.json');
// Filter peerDependencies (with config string indicating file to be required)
matchdep.filterPeer('foo-{bar,baz}', './some-other.json');
// Filter all dependencies (with explicit config provided)
matchdep.filterAll('*', require('./yet-another.json'));
// Filter all dependencies, exclude grunt (multiple matching patterns)
matchdep.filterAll(['*','!grunt']);

Usage

filter(pattern, config)
filterDev(pattern, config)
filterPeer(pattern, config)
filterAll(pattern, config)

pattern

Type: String|Array Default: 'none'

A globule compatible match pattern to filter dependencies.

config

Type: String or Object Default: Path to nearest package.json.

If config is a string, matchdep will attempt to require it. If it is an object, it will be used directly.

Release History

  • 2013-01-22 - v1.0 - throw when no package.json found.
  • 2013-10-09 - v0.3 - support multiple pattern matches using globule
  • 2013-10-08 - v0.2 - refactor and support filtering peerDependencies
  • 2012-11-27 - v0.1 - initial release
веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей

GitHub Repository

tkellen/js-matchdep tkellen/js-matchdep

Use minimatch to filter npm module dependencies by name.

Language: JavaScript

Created: November 27, 2012 19:04

Last updated: March 10, 2015 01:03

Last pushed: February 24, 2014 18:14

Size: 236 KB

Stars: 83

Forks: 6

Watchers: 5

Open issues: 1

Top Contributors

Tyler Kellen Ben Alman Huib van Geertruy Vlad Filippov Wil Moore III

Releases

  • 0.3.0 - October 09, 2013 15:35
  • 0.2.0 - October 09, 2013 04:02
  • 0.1.2 - April 07, 2013 19:45
  • 0.1.1 - November 27, 2012 20:06
  • 0.1.0 - November 27, 2012 19:15

Related Projects

configfiles 0.3.4
Get files from a configuration using globule.
npm - JavaScript - MIT - Updated about 1 year ago - 6 stars
duct 0.1.0
Easily transform object streams with any control flow you like.
npm - JavaScript - MIT - Published about 1 year ago
hacker 1.1.2
Hack on your project easily.
npm - JavaScript - MIT - Updated about 1 month ago - 6 stars
interpret 0.5.2
A dictionary of file extensions and associated module loaders.
npm - JavaScript - MIT - Updated 17 days ago - 26 stars
liftoff 2.0.3
Launch your command line tool with ease.
npm - JavaScript - MIT - Updated about 13 hours ago - 279 stars
веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей