Skip to content

Commit bafc9b5

Browse files
committed
[WIP] work through rewriting the guides (2)
1 parent 4f3c3d2 commit bafc9b5

File tree

62 files changed

+556
-499
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+556
-499
lines changed

pnpm-lock.yaml

Lines changed: 17 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/astro.config.mjs

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default defineConfig({
66
site: 'https://jamiemason.github.io/syncpack',
77
base: '/syncpack',
88
redirects: {
9-
// Hoisted
9+
// Hoisted docs
1010
'/config/semver-groups/ignored/': '/syncpack/semver-groups/ignored/',
1111
'/config/semver-groups/with-range/': '/syncpack/semver-groups/with-range/',
1212
'/config/version-groups/banned/': '/syncpack/version-groups/banned/',
@@ -18,13 +18,15 @@ export default defineConfig({
1818
'/config/version-groups/standard/': '/syncpack/version-groups/highest-semver/',
1919
'/guide/status-codes/': '/syncpack/status/',
2020
'/guide/getting-started/': '/syncpack/',
21-
// Deprecated: Removed
21+
// Merged docs
22+
'/guide/local-package-versions/': '/syncpack/dependency-types',
23+
// Deprecated Feature: Removed
2224
'/config/dependency-types/': '/syncpack/guide/upgrading/',
2325
'/config/lint-formatting/': '/syncpack/guide/upgrading/',
2426
'/config/lint-semver-ranges/': '/syncpack/guide/upgrading/',
2527
'/config/lint-versions/': '/syncpack/guide/upgrading/',
2628
'/config/specifier-types/': '/syncpack/guide/upgrading/',
27-
// Deprecated: Moved
29+
// Deprecated Feature: Moved
2830
'/command/fix-mismatches/': '/command/fix',
2931
'/command/set-semver-ranges/': '/command/fix',
3032
'/command/lint-semver-ranges/': '/command/lint',
@@ -36,11 +38,34 @@ export default defineConfig({
3638
function globalReferenceLinks() {
3739
const linksById = {
3840
CONFIG_CUSTOM_TYPES: '/syncpack/config/custom-types/',
39-
GUIDE_DEPENDENCY_TYPES: '/syncpack/guide/dependency-types/',
41+
CONFIG_SOURCE: '/syncpack/config/source/',
42+
43+
GUIDE_CATALOGS: '/syncpack/guide/catalogs/',
4044
GUIDE_PEER_DEPENDENCIES: '/syncpack/guide/peer-dependencies/',
4145
GUIDE_SEMVER_GROUPS: '/syncpack/guide/semver-groups/',
42-
GUIDE_SPECIFIER_TYPES: '/syncpack/guide/specifier-types/',
4346
GUIDE_VERSION_GROUPS: '/syncpack/guide/version-groups/',
47+
48+
REF_DEPENDENCY_TYPES: '/syncpack/dependency-types/',
49+
REF_GLOSSARY: '/syncpack/glossary/',
50+
REF_SPECIFIER_TYPES: '/syncpack/specifier-types/',
51+
REF_STATUS_CODES: '/syncpack/status/',
52+
53+
TERM_CUSTOM_TYPE: '/syncpack/glossary/#custom-type',
54+
TERM_DEPENDENCY: '/syncpack/glossary/#dependency',
55+
TERM_DEPENDENCY_GROUP: '/syncpack/glossary/#dependency-group',
56+
TERM_DEPENDENCY_TYPE: '/syncpack/glossary/#dependency-type',
57+
TERM_INSTANCE: '/syncpack/glossary/#instance',
58+
TERM_PACKAGE: '/syncpack/glossary/#package',
59+
TERM_RCFILE: '/syncpack/glossary/#rcfile',
60+
TERM_SEMVER: '/syncpack/glossary/#semver',
61+
TERM_SEMVER_GROUP: '/syncpack/glossary/#semver-group',
62+
TERM_SEMVER_RANGE: '/syncpack/glossary/#semver-range',
63+
TERM_SPECIFIER: '/syncpack/glossary/#specifier',
64+
TERM_SPECIFIER_TYPE: '/syncpack/glossary/#specifier-type',
65+
TERM_STATUS_CODE: '/syncpack/glossary/#status-code',
66+
TERM_VERSION_GROUP: '/syncpack/glossary/#version-group',
67+
TERM_WORKSPACE: '/syncpack/glossary/#workspace',
68+
4469
HREF_ANSI: 'https://en.wikipedia.org/wiki/ANSI_escape_code',
4570
HREF_AWS_SDK: 'https://aws.amazon.com/sdk-for-javascript/',
4671
HREF_CONDITIONAL_EXPORTS: 'https://nodejs.org/api/packages.html#conditional-exports',
@@ -105,9 +130,7 @@ export default defineConfig({
105130
logo: {
106131
src: './src/assets/logo.svg',
107132
},
108-
components: {
109-
Sidebar: './src/components/Sidebar.astro',
110-
},
133+
// expressiveCode: false,
111134
customCss: ['./src/styles/custom.css'],
112135
sidebar: [
113136
{
@@ -118,17 +141,22 @@ export default defineConfig({
118141
label: 'Guides',
119142
items: [
120143
{ slug: 'index', label: 'Getting Started' },
121-
{ slug: 'guide/dependency-types' },
122-
{ slug: 'guide/glossary' },
123-
{ slug: 'guide/local-package-versions' },
144+
{ slug: 'guide/catalogs' },
124145
{ slug: 'guide/peer-dependencies' },
125146
{ slug: 'guide/semver-groups' },
126-
{ slug: 'guide/specifier-types' },
127-
{ slug: 'status', label: 'Status Codes' },
128147
{ slug: 'guide/upgrading' },
129148
{ slug: 'guide/version-groups' },
130149
],
131150
},
151+
{
152+
label: 'Reference',
153+
items: [
154+
{ slug: 'dependency-types' },
155+
{ slug: 'glossary' },
156+
{ slug: 'specifier-types' },
157+
{ slug: 'status', label: 'Status Codes' },
158+
],
159+
},
132160
{
133161
label: 'Commands',
134162
autogenerate: { directory: 'command' },
@@ -149,10 +177,6 @@ export default defineConfig({
149177
label: 'Integrations',
150178
autogenerate: { directory: 'integrations' },
151179
},
152-
{
153-
label: 'Examples',
154-
autogenerate: { directory: 'examples' },
155-
},
156180
],
157181
head: [
158182
{

site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"dependencies": {
55
"@astrojs/check": "^0.9.4",
66
"@astrojs/starlight": "^0.34.3",
7-
"astro": "^5.7.12",
7+
"astro": "^5.7.13",
88
"sharp": "^0.34.1",
99
"typescript": "^5.8.3"
1010
},

site/src/_partials/default-dependency-types.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
| Value | Property in package.json |
1+
| Name | Property in package.json |
22
| :------------ | :------------------------------------------- |
33
| dev | [`devDependencies`](HREF_DEV_DEPENDENCIES) |
44
| local | [`version`](HREF_VERSION) |
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import DefaultDependencyTypes from '@partials/default-dependency-types.mdx';
2-
import CustomTypesTip from '@partials/tips/custom-types.mdx';
1+
import CustomTypesTip from "@partials/tips/custom-types.mdx";
32

4-
<CustomTypesTip />
3+
A "dependency type" refers to the path/location/nested property of package.json files where dependencies can be found.
54

65
- When set, only dependencies present in the named locations will be assigned to this group.
76
- If omitted, the default behaviour is to match dependencies everywhere they are found.
87
- Negated types are also supported, so a value of `["!dev", "!prod"]` would assign everything **except** `dependencies` and `devDependencies` to this group.
98

10-
#### Default values
9+
See the [Dependency Types](REF_DEPENDENCY_TYPES) guide for the list of possible values.
1110

12-
<DefaultDependencyTypes />
11+
<CustomTypesTip />
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
import SpecifierTypes from "@partials/specifier-types.mdx";
2-
3-
- When set, only dependencies whose version specifier matches the named formats will be assigned to this group.
1+
- When set, only dependencies whose version specifier matches the given [specifier types](REF_SPECIFIER_TYPES) will be assigned to this group.
42
- If omitted, the default behaviour is to match all dependencies.
53
- Negated types are also supported, so a value of `["!latest", "!file"]` would assign everything **except** specifiers of the format `*` and `file:path/to/package.tgz` to this group.
6-
7-
#### Available values
8-
9-
<SpecifierTypes />
File renamed without changes.

site/src/_partials/option/dependency-types.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Code } from "astro:components";
22

3-
Include dependencies of the given [dependency types](GUIDE_DEPENDENCY_TYPES) and/or [custom types](CONFIG_CUSTOM_TYPES).
3+
Include dependencies of the given [dependency types](REF_DEPENDENCY_TYPES) and/or [custom types](CONFIG_CUSTOM_TYPES).
44

55
To exclude, put a `!` at the start of your query.
66

site/src/_partials/option/source.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { Code } from "astro:components";
2-
import ResolvingPackages from "@partials/resolving-packages.mdx";
2+
import HowPackagesAreResolved from "@partials/how-packages-are-resolved.mdx";
33

44
Only run <code>{`syncpack ${props.command}`}</code> on package.json files matching the provided pattern(s).
55

6-
<ResolvingPackages />
6+
<HowPackagesAreResolved />
77

88
<Code
99
code={`# only the root package

site/src/_partials/option/specifier-types.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Code } from "astro:components";
22

3-
Include only instances whose version specifiers are of the given [specifier types](GUIDE_SPECIFIER_TYPES).
3+
Include only instances whose version specifiers are of the given [specifier types](REF_SPECIFIER_TYPES).
44

55
To exclude, put a `!` at the start of your query.
66

0 commit comments

Comments
 (0)