Skip to content

Commit

Permalink
docs(site): mark up required/optional config
Browse files Browse the repository at this point in the history
  • Loading branch information
JamieMason committed Feb 21, 2023
1 parent a17e423 commit 9137df2
Show file tree
Hide file tree
Showing 15 changed files with 87 additions and 0 deletions.
10 changes: 10 additions & 0 deletions site/docs/config/custom-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ id: custom-types
title: customTypes
---

import Pills from '@site/src/components/pill';

# `customTypes` object

<Pills optional />

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

## customTypes\[name\]

<Pills required />

The key of each custom type is its name, this can be used in the following
places to toggle when it is enabled:

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

## customTypes\[name\].path

<Pills required />

Where the version can be found in each package.json file, such as `engines`,
`packageManager` or `some.nested.property`.

## customTypes\[name\].strategy

<Pills required />

A strategy defines how syncpack needs to read and write dependency names and
versions, there are 3 to choose from:

Expand Down
3 changes: 3 additions & 0 deletions site/docs/config/dependency-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ title: dependencyTypes
---

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

# `dependencyTypes` string[]

<Pills optional />

All of the [default dependency types](#default-dependency-types) are enabled by
default, but can be reduced to a smaller list via the `dependencyTypes` property
of your config file.
Expand Down
4 changes: 4 additions & 0 deletions site/docs/config/filter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ id: filter
title: filter
---

import Pills from '@site/src/components/pill';

# `filter` string[]

<Pills optional />

A string which will be passed to `new RegExp()` to match against package names
that should be included.

Expand Down
4 changes: 4 additions & 0 deletions site/docs/config/indent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ id: indent
title: indent
---

import Pills from '@site/src/components/pill';

# `indent` string

<Pills optional />

The character(s) to be used to indent your package.json files when writing to
disk.

Expand Down
14 changes: 14 additions & 0 deletions site/docs/config/semver-groups.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ id: semver-groups
title: semverGroups
---

import Pills from '@site/src/components/pill';

# `semverGroups` object[]

<Pills optional />

Allow some packages to have different semver range rules to the rest of your
monorepo. Each dependency can only belong to one semver group, the first rule
which matches a given dependency and package will apply.
Expand Down Expand Up @@ -93,23 +97,33 @@ and peer dependencies can be broader.

## `semverGroup.range`

<Pills required />

Which of the [Supported Ranges](./semver-range.mdx#supported-ranges) this group
should use.

## `semverGroup.dependencies`

<Pills required />

Works the same as
[`versionGroup.dependencies`](./version-groups.mdx#dependencies).

## `semverGroup.isIgnored`

<Pills optional />

Works the same as [`versionGroup.isIgnored`](./version-groups.mdx#isignored).

## `semverGroup.packages`

<Pills required />

Works the same as [`versionGroup.packages`](./version-groups.mdx#packages).

## `semverGroup.dependencyTypes`

<Pills optional />

Works the same as
[`versionGroup.dependencyTypes`](./version-groups.mdx#dependencytypes).
4 changes: 4 additions & 0 deletions site/docs/config/semver-range.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ id: semver-range
title: semverRange
---

import Pills from '@site/src/components/pill';

# `semverRange` string

<Pills optional />

The semver range to be used consistently throughout your monorepo.

## Default Value
Expand Down
4 changes: 4 additions & 0 deletions site/docs/config/sort-az.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ id: sort-az
title: sortAz
---

import Pills from '@site/src/components/pill';

# `sortAz` string[]

<Pills optional />

When using the `format` command, determines which fields within package.json
files should be sorted alphabetically. When the value is an Object, its keys are
sorted alphabetically. When the value is an Array, its values are sorted
Expand Down
4 changes: 4 additions & 0 deletions site/docs/config/sort-first.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ id: sort-first
title: sortFirst
---

import Pills from '@site/src/components/pill';

# `sortFirst` string[]

<Pills optional />

When using the `format` command, determines which fields within package.json
files should appear at the top, and in what order.

Expand Down
4 changes: 4 additions & 0 deletions site/docs/config/source.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ id: source
title: source
---

import Pills from '@site/src/components/pill';

# `source` string[]

<Pills optional />

Patterns supported by [glob](https://github.com/isaacs/node-glob) to find
package.json files you want to manage with syncpack.

Expand Down
6 changes: 6 additions & 0 deletions site/docs/option/config.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ id: config
title: --config
---

import Pills from '@site/src/components/pill';

# `--config` string

<Pills optional />

If your [configuration file](../config-file.mdx) is not in the root of your
monorepo or one of it's ancestor directories, you can specify its location via
the --config option.
Expand Down
6 changes: 6 additions & 0 deletions site/docs/option/filter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ id: filter
title: --filter
---

import Pills from '@site/src/components/pill';

# `--filter` string

<Pills optional />

A string which will be passed to `new RegExp()` to match against package names
that should be included. This is useful alongside [`syncpack list`](../list.mdx)
to check the status of a subset of dependencies throughout your monorepo.
Expand Down
6 changes: 6 additions & 0 deletions site/docs/option/indent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ id: indent
title: --indent
---

import Pills from '@site/src/components/pill';

# `--indent` string

<Pills optional />

The character(s) to be used to indent your package.json files when writing to
disk. This can be used to override your [`indent`](../config/indent.mdx)
configuration on an ad hoc basis.
Expand Down
6 changes: 6 additions & 0 deletions site/docs/option/semver-range.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ id: semver-range
title: --semver-range
---

import Pills from '@site/src/components/pill';

# `--semver-range` string

<Pills optional />

Can be used with [`syncpack set-semver-ranges`](../set-semver-ranges.mdx) and
[`syncpack lint-semver-ranges`](../lint-semver-ranges.mdx) to override your
[`semverRange`](../config/semver-range.mdx) configuration on an ad hoc basis.
Expand Down
6 changes: 6 additions & 0 deletions site/docs/option/source.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ id: source
title: --source
---

import Pills from '@site/src/components/pill';

# `--source` string[]

<Pills optional />

Override your [`source`](../config/source.mdx) configuration on an ad hoc basis.

This can be useful when you only want to deal with one package at a single time,
Expand Down
6 changes: 6 additions & 0 deletions site/docs/option/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ id: types
title: --types
---

import Pills from '@site/src/components/pill';

# `--types` string

<Pills optional />

Override your [`dependencyTypes`](../config/dependency-types.mdx) configuration
on an ad hoc basis.

Expand Down

0 comments on commit 9137df2

Please sign in to comment.