find-packages
Find all packages inside a directory
Installation
npm i -S find-packages
Usage
const path = require('path')
const findPkgs = require('find-packages')
findPkgs(path.join(__dirname, 'test', 'fixture'))
.then(pkgs => console.log(pkgs))
.catch(err => console.error(err))
API
findPackages(dir, [opts])
dir
The directory in which to search for packages.
opts
Parameters normally passed to glob
opts.ignore
Patterns to ignore when searching for packages. By default: **/node_modules/**
, **/bower_components/**
, **/test/**
, **/tests/**
.
License
MIT © Zoltan Kochan