You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|repoRoot|[optional] the relative path to the root of the git repository. By default, searches parent directories for a package.json to find the "root". |
243
-
|filter |[optional] a dictionary of filter rules to whitelist packages. Filters can be applied based on package.json keys,<br />e.g. `filter: { package.name: someRegex, path: some/relative/path }`|
244
-
|sort |[optional] sort based on package properties (see `filter`), or readme length. Use `-` as a prefix to sort descending.<br />e.g. `sort: -readme.length` |
|repoRoot|[optional] the relative path to the root of the git repository. By default, searches parent directories for a package.json to find the "root". |
243
+
|filter |[optional] a dictionary of filter rules to whitelist packages. Filters can be applied based on package.json keys,<br /><br />examples:<br />- `filter: '@myorg/.*-lib'` (match packages with names matching this regex)<br />- `filter: { package.name: '@myorg/.*-lib' }` (equivalent to the above)<br />- `filter: { package.version: '^[1-9].*' }` (match packages with versions starting with a non-zero digit, i.e. 1.0.0+)<br />- `filter: '^(?!.*(internal$))'` (match packages that do not contain "internal" anywhere (using [negative lookahead](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Lookahead_assertion)))<br />- `filter: { package.name: '@myorg', path: 'libraries' }` (match packages whose name contains "@myorg" and whose path matches "libraries")<br />- `filter: { readme: 'This is production-ready' }` (match packages whose readme contains the string "This is production-ready")|
244
+
|sort |[optional] sort based on package properties (see `filter`), or readme length. Use `-` as a prefix to sort descending.<br />e.g. `sort: -readme.length` |
Copy file name to clipboardexpand all lines: src/presets/monorepo-toc.ts
+10-3
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,14 @@ import {relative} from './util/path'
22
22
* [optional] the relative path to the root of the git repository. By default, searches parent directories for a package.json to find the "root".
23
23
* @param filter
24
24
* [optional] a dictionary of filter rules to whitelist packages. Filters can be applied based on package.json keys,
25
-
* e.g. `filter: { package.name: someRegex, path: some/relative/path }`
25
+
*
26
+
* examples:
27
+
* - `filter: '@myorg/.*-lib'` (match packages with names matching this regex)
28
+
* - `filter: { package.name: '@myorg/.*-lib' }` (equivalent to the above)
29
+
* - `filter: { package.version: '^[1-9].*' }` (match packages with versions starting with a non-zero digit, i.e. 1.0.0+)
30
+
* - `filter: '^(?!.*(internal$))'` (match packages that do not contain "internal" anywhere (using [negative lookahead](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Lookahead_assertion)))
31
+
* - `filter: { package.name: '@myorg', path: 'libraries' }` (match packages whose name contains "@myorg" and whose path matches "libraries")
32
+
* - `filter: { readme: 'This is production-ready' }` (match packages whose readme contains the string "This is production-ready")
26
33
* @param sort
27
34
* [optional] sort based on package properties (see `filter`), or readme length. Use `-` as a prefix to sort descending.
0 commit comments