Skip to content

Commit a3f5a9d

Browse files
Merge pull request #1229 from st3phhays/workspaces-v1
(#1192) Yarn Workspaces & choco-theme 2.0.0
2 parents 617ffb9 + f8bee16 commit a3f5a9d

File tree

9 files changed

+5481
-9075
lines changed

9 files changed

+5481
-9075
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public/scripts
5151
public/styles
5252
public/images/global-shared
5353
src/components/global
54+
eslint.config.mjs
5455

5556
# general
5657
apple-touch-*.png

.yarn/releases/yarn-4.1.1.cjs

Lines changed: 0 additions & 893 deletions
This file was deleted.

.yarn/releases/yarn-4.10.3.cjs

Lines changed: 942 additions & 0 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ checksumBehavior: update
22

33
nodeLinker: node-modules
44

5-
yarnPath: .yarn/releases/yarn-4.1.1.cjs
5+
yarnPath: .yarn/releases/yarn-4.10.3.cjs

README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,11 @@ The following VS Code extensions are recommended to get the best development exp
110110

111111
## Understanding Astro
112112

113-
The [Chocolatey Design System](https://design.chocolatey.org) and [choco-astro](https://github.com/chocolatey/choco-astro) contain information on how to understand several Astro concepts:
114-
115-
* Learn how to [override automatically generated heading ID's](https://github.com/chocolatey/choco-astro?tab=readme-ov-file#overriding-automatically-generated-heading-ids).
116-
* Learn about Astro and how to use [Components in `.mdx` and `.astro`](https://design.chocolatey.org/foundations/astro) file types.
117-
* Learn how to use the [`<Callout />` Component](https://design.chocolatey.org/components/callouts) to display notes and important information.
118-
* Learn how to use the [`<CollapseButton />` Component](https://design.chocolatey.org/collapse-button) to display a button that triggers a collapsed element.
119-
* Learn how to use the [`<Iframe />` Component](https://design.chocolatey.org/components/iframe) to display videos with defined aspect ratios.
120-
* Learn how to use the [`<Tabs />` Component](https://design.chocolatey.org/components/tabs) to display content in tabbed interface.
121-
* Learn how to use the [`<Xref />` Component](https://design.chocolatey.org/components/xref) to link to other documents within this repository.
113+
The [Chocolatey Design System](https://design.chocolatey.org) and [@chocolatey-software/astro](https://github.com/chocolatey/choco-theme/packages/astro) contain information on how to understand several Astro concepts.
122114

123115
## Markdown Diagrams with Mermaid
124116

125-
[Mermaid](https://mermaid.js.org/) via an [Astro integration](https://github.com/chocolatey/choco-astro/blob/main/astro.config.mjs.json) allows an easy way to display information with diagrams written in markdown. Find more information on usage at the [choco-astro repository](https://github.com/chocolatey/choco-astro?tab=readme-ov-file#markdown-diagrams-with-mermaid).
117+
[Mermaid](https://mermaid.js.org/) allows an easy way to display information with diagrams written in markdown. Find more information on usage at the [chocolatey-software/astro repository](https://github.com/chocolatey/choco-theme/packages/astro#markdown-diagrams-with-mermaid).
126118

127119
## Adding A New Highlight
128120

astro.config.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { defineConfig } from 'astro/config';
2-
import sitemap from "@astrojs/sitemap";
3-
import mdx from "@astrojs/mdx";
2+
import sitemap from '@astrojs/sitemap';
3+
import mdx from '@astrojs/mdx';
44
import rehypeMermaid from 'rehype-mermaid';
55
import remarkCustomHeaderId from 'remark-custom-header-id';
6-
import { mermaidConfig } from 'choco-astro/src/scripts/util/mermaid-config';
6+
import { mermaidConfig } from '@chocolatey-software/astro/src/scripts/util/mermaid-config';
77

88
export default defineConfig({
99
site: 'https://docs.chocolatey.org',
@@ -23,7 +23,7 @@ export default defineConfig({
2323
],
2424
rehypePlugins: [
2525
[rehypeMermaid, {
26-
mermaidConfig: mermaidConfig
26+
mermaidConfig
2727
}]
2828
]
2929
},
@@ -354,4 +354,4 @@ export default defineConfig({
354354
'/en-us/create/functions/test-processadminrights': '/en-us/create/cmdlets/test-processadminrights/',
355355
'/en-us/create/functions/update-sessionenvironment': '/en-us/create/cmdlets/update-sessionenvironment/',
356356
}
357-
});
357+
});

package.json

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docs",
3-
"packageManager": "yarn@4.1.1",
3+
"packageManager": "yarn@4.10.3",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/chocolatey/docs.git"
@@ -17,18 +17,25 @@
1717
"astro": "npx astro",
1818
"browsers": "npx playwright install --with-deps",
1919
"build": "yarn dependencies && yarn telemetry && yarn choco-theme && yarn browsers && npx astro check && npx astro build",
20+
"build-copy-theme": "npx tsx node_modules/@chocolatey-software/build-tools/build/copy-theme.ts docs",
21+
"build-purge-css": "npx tsx node_modules/@chocolatey-software/build-tools/build/purge-css.ts docs",
22+
"build-copy-playwright": "npx tsx node_modules/@chocolatey-software/build-tools/build/copy-playwright.ts docs",
2023
"dependencies": "yarn install --immutable",
2124
"dev": "yarn dependencies && yarn telemetry && yarn choco-theme && yarn browsers && npx astro dev",
2225
"playwright": "npx playwright test",
23-
"playwright-copy": "node node_modules/choco-playwright/build/copy-playwright.js",
2426
"preview": "npx astro preview",
2527
"start": "yarn dev",
2628
"telemetry": "npx astro telemetry disable",
27-
"choco-theme": "npx --quiet ts-node --skipIgnore node_modules/choco-theme/build/choco-theme.ts --repository=docs && yarn playwright-copy"
29+
"choco-theme": "yarn build-copy-theme && yarn build-copy-playwright && yarn build-purge-css",
30+
"link-packages": "npx tsx node_modules/@chocolatey-software/build-tools/build/link.ts"
31+
},
32+
"devDependencies": {
33+
"@chocolatey-software/assets": "2.0.0",
34+
"@chocolatey-software/astro": "2.0.0",
35+
"@chocolatey-software/build-tools": "2.0.0",
36+
"@chocolatey-software/playwright": "2.0.0"
2837
},
2938
"dependencies": {
30-
"choco-astro": "0.3.2",
31-
"choco-playwright": "0.1.0",
32-
"choco-theme": "1.3.0"
39+
"@chocolatey-software/docs": "2.0.0"
3340
}
3441
}

tsconfig.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
{
22
"extends": "astro/tsconfigs/strict",
33
"compilerOptions": {
4-
"baseUrl": ".",
54
"paths": {
6-
"@choco-astro/components/*": ["node_modules/choco-astro/src/components/*"],
7-
"@choco-playwright/*": ["playwright/global/*"],
8-
"@content/*": ["src/content/*"],
9-
"@components/*": ["src/components/*"],
10-
"@layouts/*": ["src/layouts/*"],
5+
"@choco-astro/components/*": ["./node_modules/@chocolatey-software/astro/src/components/*"],
6+
"@choco-playwright/*": ["./playwright/global/*"],
7+
"@content/*": ["./src/content/*"],
8+
"@components/*": ["./src/components/*"],
9+
"@layouts/*": ["./src/layouts/*"],
1110
"@root/*": ["./*"],
12-
"@styles/*": ["src/styles/*"],
13-
"@scripts/*": ["src/scripts/*"]
11+
"@styles/*": ["./src/styles/*"],
12+
"@scripts/*": ["./src/scripts/*"]
1413
}
1514
}
1615
}

0 commit comments

Comments
 (0)