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.4179,950latest
8.0.14671latest-6
7.0.152pnpm-temp

Version History

VersionDownloads (Last 7 Days)Published
10.0.4179,950
10.0.318
10.0.233
10.0.1659
10.0.03
9.0.131,315
9.0.1213
9.0.1113
9.0.1044
9.0.9537
9.0.86
9.0.713
8.0.14671
9.0.6506
9.0.510
9.0.48
9.0.314
9.0.2108
9.0.119
9.0.034
8.0.131,239
8.0.1217
8.0.11106
8.0.101,843
8.0.915,162
8.0.82
8.0.73
8.0.62
8.0.52
8.0.45
8.0.32
8.0.22
8.0.12
8.0.02
7.0.2452
7.0.232
7.0.222
7.0.212
7.0.202
7.0.192
7.0.182
7.0.172
7.0.165
7.0.152
7.0.142
7.0.132
7.0.122
7.0.112
7.0.102
7.0.92
7.0.82
7.0.8-alpha.02
7.0.72
7.0.6406
7.0.52
7.0.42
7.0.32
7.0.23
7.0.12
7.0.02
6.0.02
5.1.02
5.0.102
5.0.92
5.0.82
5.0.72
5.0.62
5.0.52
5.0.42
5.0.32
5.0.22
5.0.12
5.0.02
4.0.12
4.0.02
3.0.02
2.2.03
2.1.22
2.1.12
2.1.02
2.0.02
1.0.02
0.0.02

Package Sidebar

Install

npm i find-packages

Weekly Downloads

202,920

Version

10.0.4

License

MIT

Unpacked Size

8.45 kB

Total Files

6

Last publish

Collaborators

  • zkochan
  • pnpmuser