find-packages
Find all packages inside a directory
Last updated 2 months ago by zkochan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install find-packages 
SYNC missed versions from official npm registry.

find-packages

Find all packages inside a directory

npm version

Installation

<npm|yarn|pnpm> add 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))
  //> [ { path: '/home/zkochan/src/find-packages/test/fixture/pkg',
  //      manifest: { name: 'foo', version: '1.0.0' },
  //      writeProjectManifest: [AsyncFunction] } ]

API

findPackages(dir, [opts])

dir

The directory in which to search for packages.

opts

Parameters normally passed to glob

opts.patterns

Array of globs to use as package locations. For example: ['packages/**', 'utils/**'].

opts.ignore

Patterns to ignore when searching for packages. By default: **/node_modules/**, **/bower_components/**, **/test/**, **/tests/**.

License

MIT © Zoltan Kochan

Current Tags

  • 7.0.6                                ...           latest (2 months ago)
  • 7.0.8                                ...           pnpm-temp (14 days ago)

33 Versions

  • 7.0.8                                ...           14 days ago
  • 7.0.8-alpha.0                                ...           25 days ago
  • 7.0.7                                ...           a month ago
  • 7.0.6                                ...           2 months ago
  • 7.0.5                                ...           3 months ago
  • 7.0.4                                ...           3 months ago
  • 7.0.3                                ...           3 months ago
  • 7.0.2                                ...           5 months ago
  • 7.0.1                                ...           6 months ago
  • 7.0.0                                ...           7 months ago
  • 6.0.0                                ...           8 months ago
  • 5.1.0                                ...           9 months ago
  • 5.0.10                                ...           9 months ago
  • 5.0.9                                ...           10 months ago
  • 5.0.8                                ...           10 months ago
  • 5.0.7                                ...           10 months ago
  • 5.0.6                                ...           a year ago
  • 5.0.5                                ...           a year ago
  • 5.0.4                                ...           a year ago
  • 5.0.3                                ...           a year ago
  • 5.0.2                                ...           a year ago
  • 5.0.1                                ...           a year ago
  • 5.0.0                                ...           a year ago
  • 4.0.1                                ...           a year ago
  • 4.0.0                                ...           a year ago
  • 3.0.0                                ...           a year ago
  • 2.2.0                                ...           2 years ago
  • 2.1.2                                ...           2 years ago
  • 2.1.1                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 33
This Month 33
Last Day 0
Last Week 5
Last Month 205
Dependencies (4)
Dev Dependencies (1)

Copyright 2014 - 2016 © taobao.org |