find-packages
TypeScript icon, indicating that this package has built-in type declarations

10.0.4 • Public • Published

find-packages

Find all packages inside a directory

npm version

Installation

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

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
10.0.4134,060latest
7.0.150pnpm-temp
8.0.141,080latest-6

Version History

VersionDownloads (Last 7 Days)Published
10.0.4134,060
10.0.316
10.0.238
10.0.1277
10.0.00
9.0.13193
9.0.120
9.0.1136
9.0.10158
9.0.9688
9.0.8574
9.0.70
8.0.141,080
9.0.6287
9.0.59
9.0.40
9.0.37
9.0.245
9.0.10
9.0.01,028
8.0.13400
8.0.123
8.0.1147
8.0.102,851
8.0.916,216
8.0.80
8.0.71
8.0.6175
8.0.54
8.0.40
8.0.30
8.0.20
8.0.10
8.0.00
7.0.2439
7.0.231
7.0.220
7.0.210
7.0.200
7.0.190
7.0.180
7.0.171
7.0.160
7.0.150
7.0.140
7.0.130
7.0.120
7.0.110
7.0.100
7.0.91
7.0.80
7.0.8-alpha.00
7.0.70
7.0.6616
7.0.50
7.0.41
7.0.30
7.0.21
7.0.10
7.0.00
6.0.00
5.1.00
5.0.100
5.0.90
5.0.80
5.0.70
5.0.62
5.0.50
5.0.40
5.0.30
5.0.20
5.0.10
5.0.02
4.0.10
4.0.00
3.0.00
2.2.0541
2.1.20
2.1.10
2.1.00
2.0.00
1.0.01
0.0.00

Package Sidebar

Install

npm i find-packages

Weekly Downloads

135,730

Version

10.0.4

License

MIT

Unpacked Size

8.45 kB

Total Files

6

Last publish

Collaborators

  • zkochan
  • pnpmuser