3.0.0 • Published 24 days ago

@pnpm/fs.find-packages v3.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
24 days ago

@pnpm/fs.find-packages

Find all packages inside a directory

npm version

Installation

pnpm add @pnpm/fs.find-packages

Usage

const path = require('path')
const findPkgs = require('@pnpm/fs.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

3.0.0

24 days ago

2.0.11

2 months ago

2.0.10

4 months ago

2.0.9

5 months ago

2.0.3

10 months ago

2.0.5

8 months ago

2.0.4

10 months ago

2.0.7

7 months ago

2.0.6

8 months ago

2.0.8

6 months ago

2.0.2

11 months ago

2.0.1

11 months ago

2.0.0

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago