2.4.6 • Published 10 months ago

@techor/query-workspaces v2.4.6

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago
  • By default, read .workspaces of package.json in the current working directory
  • By default, workspaces in node_modules are excluded

Getting Started

npm install @techor/query-workspaces

Preparation

Your monorepo usually looks like this:

.
├── package.json
└── packages
+   ├─── a
    │    └─── package.json
+   ├─── b
    │    ├─── node_modules
    │    │    └─── fake-module
    │    │         └─── package.json
+   │    ├─── bb
    │    │    └─── package.json
    │    └─── package.json
    └─── c

./package.json

{
    "workspaces": ["packages/**"]
}

Usage

queryWorkspaces(patterns?, options?): string[]

import queryWorkspaces from '@techor/query-workspaces'

const workspaces = queryWorkspaces()
// ['packages/a', 'packages/b', 'packages/b/bb']

const workspaces = queryWorkspaces(['packages/*'])
// ['packages/a', 'packages/b']

Options

Inherited from fast-glob options

{
    cwd: process.cwd(),
    ignore: ['**/node_modules/**']
}
2.4.1

10 months ago

2.4.0

10 months ago

2.4.3

10 months ago

2.2.13

10 months ago

2.4.2

10 months ago

2.4.5

10 months ago

2.4.4

10 months ago

2.2.12

10 months ago

2.3.8

10 months ago

2.3.7

10 months ago

2.3.0

10 months ago

2.3.2

10 months ago

2.3.1

10 months ago

2.3.4

10 months ago

2.3.3

10 months ago

2.3.6

10 months ago

2.3.5

10 months ago

2.4.6

10 months ago

2.2.3

11 months ago

2.2.2

11 months ago

2.2.5

11 months ago

2.2.4

11 months ago

2.2.11

11 months ago

2.2.7

11 months ago

2.2.6

11 months ago

2.2.10

11 months ago

2.2.9

11 months ago

2.2.8

11 months ago

2.2.1

11 months ago

2.2.0

11 months ago

2.1.15

1 year ago

2.1.14

1 year ago

2.1.13

1 year ago

2.1.12

1 year ago

2.1.11

1 year ago

2.1.10

1 year ago

2.1.9

1 year ago

2.1.8

1 year ago

2.1.7

1 year ago

2.1.6

1 year ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.2

1 year ago

2.1.1

1 year ago

2.0.6

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago