diff options
author | Gar <gar+gh@danger.computer> | 2021-02-12 20:40:14 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-02-12 20:40:14 +0300 |
commit | 7788ce47bc264d9d951055da85f2b695eb8b3f15 (patch) | |
tree | 44c56d780079a2e3887ddf2683d53b1d57f9af71 /node_modules/@npmcli | |
parent | 868954a72c06ff2210b35e1e75571f4ec3357c43 (diff) |
@npmcli/map-workspaces@1.0.3
Diffstat (limited to 'node_modules/@npmcli')
-rw-r--r-- | node_modules/@npmcli/map-workspaces/README.md | 30 | ||||
-rw-r--r-- | node_modules/@npmcli/map-workspaces/package.json | 2 |
2 files changed, 19 insertions, 13 deletions
diff --git a/node_modules/@npmcli/map-workspaces/README.md b/node_modules/@npmcli/map-workspaces/README.md index f8e114c2a..52e4a42d3 100644 --- a/node_modules/@npmcli/map-workspaces/README.md +++ b/node_modules/@npmcli/map-workspaces/README.md @@ -17,13 +17,16 @@ Long version: Reads the `workspaces` property from a valid **workspaces configur ```js const mapWorkspaces = require('@npmcli/map-workspaces') await mapWorkspaces({ - workspaces: { - packages: [ - "a", - "b" - ] + cwd, + pkg: { + workspaces: { + packages: [ + "a", + "b" + ] + } } -}, { cwd }) +}) // -> // Map { // 'a': '<cwd>/a' @@ -51,10 +54,13 @@ Given a folder structure such as: ```js const mapWorkspaces = require('@npmcli/map-workspaces') await mapWorkspaces({ - workspaces: [ - "apps/*" - ] -}, { cwd }) + cwd, + pkg: { + workspaces: [ + "apps/*" + ] + } +}) // -> // Map { // 'a': '<cwd>/apps/a' @@ -65,10 +71,10 @@ await mapWorkspaces({ ## API: -### `mapWorkspaces(pkg, opts = {}) -> Promise<Map>` +### `mapWorkspaces(opts) -> Promise<Map>` -- `pkg`: A valid `package.json` **Object** - `opts`: + - `pkg`: A valid `package.json` **Object** - `cwd`: A **String** defining the base directory to use when reading globs and paths. - `ignore`: An **Array** of paths to be ignored when using [globs](https://www.npmjs.com/package/glob) to look for nested package. - ...[Also support all other glob options](https://www.npmjs.com/package/glob#options) diff --git a/node_modules/@npmcli/map-workspaces/package.json b/node_modules/@npmcli/map-workspaces/package.json index df509648d..2445c12f9 100644 --- a/node_modules/@npmcli/map-workspaces/package.json +++ b/node_modules/@npmcli/map-workspaces/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/map-workspaces", - "version": "1.0.2", + "version": "1.0.3", "files": [ "index.js" ], |