Skip to content

Commit 9137df2

Browse files
committed
docs(site): mark up required/optional config
1 parent a17e423 commit 9137df2

File tree

15 files changed

+87
-0
lines changed

15 files changed

+87
-0
lines changed

site/docs/config/custom-types.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ id: custom-types
33
title: customTypes
44
---
55

6+
import Pills from '@site/src/components/pill';
7+
68
# `customTypes` object
79

10+
<Pills optional />
11+
812
Extend syncpack to find and fix versions in your packages which are not
913
available by default. Custom types behave like any other dependency, so can be
1014
included in [versionGroups](./version-groups.mdx) or
@@ -35,6 +39,8 @@ The example below adds support for synchronising versions found in:
3539

3640
## customTypes\[name\]
3741

42+
<Pills required />
43+
3844
The key of each custom type is its name, this can be used in the following
3945
places to toggle when it is enabled:
4046

@@ -45,11 +51,15 @@ places to toggle when it is enabled:
4551

4652
## customTypes\[name\].path
4753

54+
<Pills required />
55+
4856
Where the version can be found in each package.json file, such as `engines`,
4957
`packageManager` or `some.nested.property`.
5058

5159
## customTypes\[name\].strategy
5260

61+
<Pills required />
62+
5363
A strategy defines how syncpack needs to read and write dependency names and
5464
versions, there are 3 to choose from:
5565

site/docs/config/dependency-types.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ title: dependencyTypes
44
---
55

66
import DefaultDependencyTypes from '@site/src/partials/default-dependency-types.mdx';
7+
import Pills from '@site/src/components/pill';
78

89
# `dependencyTypes` string[]
910

11+
<Pills optional />
12+
1013
All of the [default dependency types](#default-dependency-types) are enabled by
1114
default, but can be reduced to a smaller list via the `dependencyTypes` property
1215
of your config file.

site/docs/config/filter.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ id: filter
33
title: filter
44
---
55

6+
import Pills from '@site/src/components/pill';
7+
68
# `filter` string[]
79

10+
<Pills optional />
11+
812
A string which will be passed to `new RegExp()` to match against package names
913
that should be included.
1014

site/docs/config/indent.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ id: indent
33
title: indent
44
---
55

6+
import Pills from '@site/src/components/pill';
7+
68
# `indent` string
79

10+
<Pills optional />
11+
812
The character(s) to be used to indent your package.json files when writing to
913
disk.
1014

site/docs/config/semver-groups.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ id: semver-groups
33
title: semverGroups
44
---
55

6+
import Pills from '@site/src/components/pill';
7+
68
# `semverGroups` object[]
79

10+
<Pills optional />
11+
812
Allow some packages to have different semver range rules to the rest of your
913
monorepo. Each dependency can only belong to one semver group, the first rule
1014
which matches a given dependency and package will apply.
@@ -93,23 +97,33 @@ and peer dependencies can be broader.
9397

9498
## `semverGroup.range`
9599

100+
<Pills required />
101+
96102
Which of the [Supported Ranges](./semver-range.mdx#supported-ranges) this group
97103
should use.
98104

99105
## `semverGroup.dependencies`
100106

107+
<Pills required />
108+
101109
Works the same as
102110
[`versionGroup.dependencies`](./version-groups.mdx#dependencies).
103111

104112
## `semverGroup.isIgnored`
105113

114+
<Pills optional />
115+
106116
Works the same as [`versionGroup.isIgnored`](./version-groups.mdx#isignored).
107117

108118
## `semverGroup.packages`
109119

120+
<Pills required />
121+
110122
Works the same as [`versionGroup.packages`](./version-groups.mdx#packages).
111123

112124
## `semverGroup.dependencyTypes`
113125

126+
<Pills optional />
127+
114128
Works the same as
115129
[`versionGroup.dependencyTypes`](./version-groups.mdx#dependencytypes).

site/docs/config/semver-range.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ id: semver-range
33
title: semverRange
44
---
55

6+
import Pills from '@site/src/components/pill';
7+
68
# `semverRange` string
79

10+
<Pills optional />
11+
812
The semver range to be used consistently throughout your monorepo.
913

1014
## Default Value

site/docs/config/sort-az.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ id: sort-az
33
title: sortAz
44
---
55

6+
import Pills from '@site/src/components/pill';
7+
68
# `sortAz` string[]
79

10+
<Pills optional />
11+
812
When using the `format` command, determines which fields within package.json
913
files should be sorted alphabetically. When the value is an Object, its keys are
1014
sorted alphabetically. When the value is an Array, its values are sorted

site/docs/config/sort-first.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ id: sort-first
33
title: sortFirst
44
---
55

6+
import Pills from '@site/src/components/pill';
7+
68
# `sortFirst` string[]
79

10+
<Pills optional />
11+
812
When using the `format` command, determines which fields within package.json
913
files should appear at the top, and in what order.
1014

site/docs/config/source.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ id: source
33
title: source
44
---
55

6+
import Pills from '@site/src/components/pill';
7+
68
# `source` string[]
79

10+
<Pills optional />
11+
812
Patterns supported by [glob](https://github.com/isaacs/node-glob) to find
913
package.json files you want to manage with syncpack.
1014

site/docs/option/config.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ id: config
33
title: --config
44
---
55

6+
import Pills from '@site/src/components/pill';
7+
8+
# `--config` string
9+
10+
<Pills optional />
11+
612
If your [configuration file](../config-file.mdx) is not in the root of your
713
monorepo or one of it's ancestor directories, you can specify its location via
814
the --config option.

0 commit comments

Comments
 (0)