@astryxdesign/cli 0.7.3 → 0.7.4-canary.1a552f2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -63
- package/api/component/_adapter.mjs +4 -3
- package/api/component/component.mjs +13 -6
- package/api/component/doc-links.test.mjs +33 -0
- package/api/discover/_adapter.mjs +22 -10
- package/api/discover/_catalog-view.d.mts +2 -0
- package/api/discover/_catalog-view.mjs +1 -0
- package/api/discover/_catalog-view.test.mjs +1 -0
- package/api/discover/detail/detail.mjs +1 -0
- package/api/discover/detail/detail.test.mjs +3 -0
- package/api/discover/detail/doc/doc.mjs +5 -1
- package/api/discover/detail/doc/doc.test.mjs +1 -0
- package/api/discover/detail/item/item.mjs +2 -0
- package/api/discover/detail/item/item.test.mjs +2 -0
- package/api/discover/discover.doc.mjs +4 -4
- package/api/discover/discover.type.d.mts +20 -0
- package/api/discover/discover.type.mjs +5 -0
- package/api/discover/list/list.test.mjs +2 -0
- package/api/discover/search/search.d.mts +3 -2
- package/api/discover/search/search.mjs +26 -7
- package/api/discover/search/search.test.mjs +67 -0
- package/api/docs/_adapter.d.mts +80 -0
- package/api/docs/_adapter.mjs +261 -11
- package/api/docs/detail/detail.mjs +8 -0
- package/api/docs/docOverlays.test.mjs +2 -1
- package/api/docs/docs.d.mts +16 -6
- package/api/docs/docs.doc.mjs +1 -1
- package/api/docs/docs.mjs +55 -6
- package/api/docs/docs.type.d.mts +28 -2
- package/api/docs/docs.type.mjs +13 -3
- package/api/docs/guide-route-targets.test.mjs +1002 -0
- package/api/docs/index/index.mjs +9 -0
- package/api/docs/integration-tree.test.mjs +22 -0
- package/api/docs/integrationDocs.test.mjs +85 -0
- package/api/docs/list/list.mjs +7 -1
- package/api/docs/node/node.mjs +9 -1
- package/api/docs/reference-blocks.test.mjs +1 -1
- package/api/doctor/_adapter.d.mts +40 -0
- package/api/doctor/_adapter.mjs +171 -1
- package/api/doctor/built-checks.d.mts +85 -0
- package/api/doctor/built-checks.mjs +837 -0
- package/api/doctor/built-checks.test.mjs +531 -0
- package/api/doctor/doctor.d.mts +6 -5
- package/api/doctor/doctor.doc.mjs +11 -1
- package/api/doctor/doctor.mjs +18 -3
- package/api/doctor/doctor.type.d.mts +6 -0
- package/api/doctor/doctor.type.mjs +3 -0
- package/api/hook/list/list.d.mts +1 -1
- package/api/integration/_adapter.d.mts +11 -2
- package/api/integration/_adapter.mjs +30 -4
- package/api/integration/authoring-checks.mjs +29 -2
- package/api/integration/authoring-checks.test.mjs +131 -1
- package/api/integration/check/check.d.mts +4 -1
- package/api/integration/check/check.mjs +34 -4
- package/api/integration/check/check.test.mjs +49 -0
- package/api/integration/integration-check.type.d.mts +8 -0
- package/api/integration/integration-check.type.mjs +4 -1
- package/api/integration/integrationCheck.doc.mjs +8 -1
- package/api/integration/integrationDocConflicts.doc.mjs +1 -1
- package/api/integration/pack-check.mjs +71 -2
- package/api/integration/pack-check.test.mjs +77 -0
- package/api/integration/validate-integration-case-disk.test.mjs +2 -0
- package/api/integration/validate-integration-gaps.test.mjs +7 -4
- package/api/integration/validate-integration.mjs +96 -14
- package/api/integration/validate-integration.type.d.mts +10 -4
- package/api/integration/validate-integration.type.mjs +10 -5
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/search/_candidate-score.d.mts +3 -2
- package/api/search/_candidate-score.mjs +66 -3
- package/api/search/_gather-docs.mjs +12 -2
- package/api/search/_priority.mjs +2 -1
- package/api/search/_score.d.mts +2 -1
- package/api/search/_score.mjs +2 -2
- package/api/search/search.doc.mjs +1 -1
- package/api/search/search.family-members.test.mjs +124 -0
- package/api/search/search.mjs +28 -0
- package/api/theme/palette/generate/generate.d.mts +8 -0
- package/api/theme/palette/generate/generate.mjs +38 -11
- package/api/theme/palette/generate/generate.test.mjs +83 -4
- package/api/theme/palette/generate/generator.d.mts +6 -0
- package/api/theme/palette/generate/generator.mjs +6 -0
- package/api/theme/theme.type.d.mts +12 -1
- package/api/theme/theme.type.mjs +7 -1
- package/api/theme/themeBuild.doc.mjs +1 -1
- package/api/theme/themeList.doc.mjs +1 -1
- package/api/theme/themePaletteGenerate.doc.mjs +1 -1
- package/api/theme/themeTargets.doc.mjs +1 -1
- package/assets/discover/official-packages.json +16 -0
- package/assets/docs/author-a-theme.doc.mjs +15 -15
- package/assets/docs/browser-support.doc.mjs +1 -1
- package/assets/docs/getting-started.doc.mjs +16 -16
- package/assets/docs/is-my-code-good.doc.mjs +6 -6
- package/assets/docs/styling-overview.doc.mjs +5 -5
- package/assets/docs/theme.doc.mjs +5 -5
- package/assets/docs/tree/add-a-component.doc.mjs +1 -1
- package/assets/docs/tree/add-a-theme.doc.mjs +2 -2
- package/assets/docs/tree/add-a-topic.doc.mjs +6 -6
- package/assets/docs/tree/agent-guidance.doc.mjs +5 -5
- package/assets/docs/tree/authoring.doc.mjs +2 -2
- package/assets/docs/tree/block-template.doc.mjs +1 -1
- package/assets/docs/tree/check-the-props.doc.mjs +3 -3
- package/assets/docs/tree/check-your-docs.doc.mjs +6 -6
- package/assets/docs/tree/checks.doc.mjs +11 -11
- package/assets/docs/tree/ci-and-containers.doc.mjs +1 -1
- package/assets/docs/tree/cli-command.doc.mjs +6 -6
- package/assets/docs/tree/codemods.doc.mjs +7 -7
- package/assets/docs/tree/component-family.doc.mjs +1 -1
- package/assets/docs/tree/component-imports.doc.mjs +2 -2
- package/assets/docs/tree/component-lookups.doc.mjs +6 -5
- package/assets/docs/tree/computer-agent-guide.doc.mjs +7 -7
- package/assets/docs/tree/computer-integrations.doc.mjs +5 -5
- package/assets/docs/tree/debug-and-gap-reports.doc.mjs +3 -3
- package/assets/docs/tree/define-the-theme.doc.mjs +1 -1
- package/assets/docs/tree/describe-the-component.doc.mjs +1 -1
- package/assets/docs/tree/doc-syntax.doc.mjs +219 -0
- package/assets/docs/tree/export-template-assets.doc.mjs +1 -1
- package/assets/docs/tree/extend-or-replace.doc.mjs +39 -7
- package/assets/docs/tree/font-setup.doc.mjs +1 -1
- package/assets/docs/tree/generate-a-palette.doc.mjs +1 -1
- package/assets/docs/tree/global-integrations.doc.mjs +11 -11
- package/assets/docs/tree/global.doc.mjs +2 -2
- package/assets/docs/tree/host-entry.doc.mjs +1 -1
- package/assets/docs/tree/install-once.doc.mjs +4 -4
- package/assets/docs/tree/layout.doc.mjs +1 -1
- package/assets/docs/tree/links.doc.mjs +2 -2
- package/assets/docs/tree/migration-setup.doc.mjs +15 -15
- package/assets/docs/tree/migration.doc.mjs +2 -1
- package/assets/docs/tree/other-libraries.doc.mjs +1 -1
- package/assets/docs/tree/page-template.doc.mjs +2 -2
- package/assets/docs/tree/problems.doc.mjs +8 -8
- package/assets/docs/tree/project-global-or-both.doc.mjs +2 -2
- package/assets/docs/tree/publishing.doc.mjs +7 -7
- package/assets/docs/tree/quick-start.doc.mjs +9 -9
- package/assets/docs/tree/reference.doc.mjs +2 -2
- package/assets/docs/tree/replace-a-core-component.doc.mjs +1 -1
- package/assets/docs/tree/replace-a-core-template.doc.mjs +4 -4
- package/assets/docs/tree/scaffold.doc.mjs +1 -1
- package/assets/docs/tree/sections-and-placement.doc.mjs +3 -3
- package/assets/docs/tree/see-it-in-an-app.doc.mjs +3 -3
- package/assets/docs/tree/short-and-findable.doc.mjs +3 -3
- package/assets/docs/tree/single-component.doc.mjs +4 -4
- package/assets/docs/tree/start-a-template.doc.mjs +5 -5
- package/assets/docs/tree/styling-advanced.doc.mjs +1 -1
- package/assets/docs/tree/styling-libraries.doc.mjs +2 -1
- package/assets/docs/tree/styling.doc.mjs +1 -1
- package/assets/docs/tree/tailwind.doc.mjs +1 -1
- package/assets/docs/tree/test-in-an-app.doc.mjs +5 -5
- package/assets/docs/tree/test-template-in-app.doc.mjs +6 -6
- package/assets/docs/tree/tokens-and-setup.doc.mjs +1 -1
- package/assets/docs/tree/troubleshooting.doc.mjs +24 -20
- package/assets/docs/tree/uninstall.doc.mjs +2 -2
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs/tree/upgrading.doc.mjs +3 -3
- package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +1 -1
- package/assets/docs/tree/verify-packed-template.doc.mjs +3 -3
- package/assets/docs/tree/versioning.doc.mjs +4 -4
- package/assets/docs/tree/who-answers.doc.mjs +4 -4
- package/assets/docs/tree/write-the-template-file.doc.mjs +4 -4
- package/assets/docs/use-a-theme.doc.mjs +10 -10
- package/assets/docs/use-integrations.doc.mjs +1 -1
- package/assets/docs/working-with-ai.doc.mjs +15 -15
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherReviewFlow.doc.mjs +1 -1
- package/assets/templates/blocks/components/BottomSheet/BottomSheetSwitcherShowcase.doc.mjs +1 -1
- package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +54 -0
- package/assets/templates/themes/butter/butterPalettes.generated.receipt.json +1499 -0
- package/assets/templates/themes/butter/butterPalettes.generated.ts +550 -0
- package/assets/templates/themes/butter/butterTheme.ts +274 -234
- package/assets/templates/themes/butter/palette.config.json +484 -0
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +41 -0
- package/assets/templates/themes/gothic/gothicPalettes.generated.receipt.json +979 -0
- package/assets/templates/themes/gothic/gothicPalettes.generated.ts +271 -0
- package/assets/templates/themes/gothic/gothicTheme.ts +130 -160
- package/assets/templates/themes/gothic/palette.config.json +371 -0
- package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +51 -0
- package/assets/templates/themes/matcha/matchaPalettes.generated.receipt.json +1502 -0
- package/assets/templates/themes/matcha/matchaPalettes.generated.ts +501 -0
- package/assets/templates/themes/matcha/matchaPalettes.ts +21 -0
- package/assets/templates/themes/matcha/matchaTheme.ts +164 -103
- package/assets/templates/themes/matcha/palette.config.json +448 -0
- package/assets/templates/themes/stone/palette.config.json +262 -0
- package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +51 -0
- package/assets/templates/themes/stone/stonePalettes.generated.receipt.json +840 -0
- package/assets/templates/themes/stone/stonePalettes.generated.ts +501 -0
- package/assets/templates/themes/stone/stoneTheme.ts +190 -207
- package/assets/templates/themes/y2k/palette.config.json +166 -0
- package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +54 -0
- package/assets/templates/themes/y2k/y2kPalettes.generated.receipt.json +872 -0
- package/assets/templates/themes/y2k/y2kPalettes.generated.ts +550 -0
- package/assets/templates/themes/y2k/y2kPalettes.ts +257 -0
- package/assets/templates/themes/y2k/y2kTheme.ts +164 -391
- package/authoring/codemod/codemod.doc.mjs +1 -1
- package/authoring/config/config.doc.mjs +4 -4
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/discover/discover.doc.mjs +1 -1
- package/authoring/doctypes/_schema.d.mts +4 -0
- package/authoring/doctypes/_schema.mjs +4 -0
- package/authoring/doctypes/reference/type.ts +14 -2
- package/authoring/gap-report/gap-report.doc.mjs +1 -1
- package/authoring/integration/integration.doc.mjs +6 -6
- package/clients/cli/commands/discover.mjs +1 -1
- package/clients/cli/commands/discover.sources.test.mjs +6 -0
- package/clients/cli/commands/docs.doc.mjs +1 -1
- package/clients/cli/commands/docs.mjs +27 -2
- package/clients/cli/commands/docs.test.mjs +1 -1
- package/clients/cli/commands/doctor-integration-docs.doc.mjs +1 -1
- package/clients/cli/commands/doctor.doc.mjs +13 -1
- package/clients/cli/commands/doctor.mjs +25 -9
- package/clients/cli/commands/integration-check.doc.mjs +11 -0
- package/clients/cli/commands/integration-check.test.mjs +36 -3
- package/clients/cli/commands/integration-pack.doc.mjs +1 -1
- package/clients/cli/commands/integration-verify.doc.mjs +1 -1
- package/clients/cli/commands/integration.mjs +15 -3
- package/clients/cli/commands/theme-targets.doc.mjs +1 -1
- package/clients/cli/commands/upgrade.doc.mjs +2 -2
- package/clients/cli/lib/define-command.mjs +5 -3
- package/foundation/agent-docs/agent-docs.d.mts +14 -2
- package/foundation/agent-docs/agent-docs.mjs +65 -4
- package/foundation/agent-docs/agent-docs.test.mjs +107 -0
- package/foundation/discovery/docs-discovery.d.mts +93 -2
- package/foundation/discovery/docs-discovery.mjs +237 -8
- package/foundation/discovery/runner-allowlist.d.mts +2 -0
- package/foundation/discovery/runner-allowlist.mjs +4 -0
- package/foundation/discovery/runner-commands.d.mts +29 -13
- package/foundation/discovery/runner-commands.mjs +253 -17
- package/foundation/discovery/stray-pointers.mjs +11 -5
- package/foundation/discovery/stray-pointers.test.mjs +6 -0
- package/foundation/doc-compiler/compile.mjs +8 -1
- package/foundation/doc-compiler/doc-loads.test.mjs +3 -0
- package/foundation/doc-compiler/doc-syntax.d.mts +194 -0
- package/foundation/doc-compiler/doc-syntax.mjs +739 -0
- package/foundation/doc-compiler/doc-syntax.test.mjs +383 -0
- package/foundation/doc-compiler/links.d.mts +13 -16
- package/foundation/doc-compiler/links.mjs +40 -7
- package/foundation/doc-compiler/tree.d.mts +5 -0
- package/foundation/doc-compiler/tree.mjs +9 -0
- package/foundation/env/package-manager.d.mts +18 -0
- package/foundation/env/package-manager.mjs +40 -0
- package/foundation/integrations/cli-requirement.d.mts +29 -0
- package/foundation/integrations/cli-requirement.mjs +47 -0
- package/foundation/integrations/cli-requirement.test.mjs +23 -2
- package/foundation/response/error-codes.test.mjs +9 -0
- package/foundation/response/response-types.doc.mjs +11 -11
- package/foundation/response/response-types.doc.test.mjs +29 -0
- package/package.json +9 -9
|
@@ -106,7 +106,7 @@ export const docs = {
|
|
|
106
106
|
items: [
|
|
107
107
|
'`integration add` appends the manifest and templates directory when a `files` list already exists. Add the other directories yourself.',
|
|
108
108
|
'If `package.json` sets `sideEffects`, include CSS in it, as above, so bundlers keep side-effect stylesheet imports.',
|
|
109
|
-
'Run `npm pack --dry-run` and read the real file list instead of reasoning from the workspace.',
|
|
109
|
+
'Run `{@pm-only npm "the tarball the registry receives" pack --dry-run}` and read the real file list instead of reasoning from the workspace.',
|
|
110
110
|
],
|
|
111
111
|
},
|
|
112
112
|
],
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @file `astryx docs authoring/building-blocks/docs/extend-or-replace`:
|
|
5
|
-
* take over an existing topic with `replaces`, merge sections into
|
|
6
|
-
* `extends
|
|
5
|
+
* take over an existing topic or guide with `replaces`, merge sections into
|
|
6
|
+
* one with `extends` (placing each with `before` or `after`), and check
|
|
7
|
+
* overlaps with Core topics.
|
|
7
8
|
*/
|
|
8
9
|
|
|
9
10
|
/** @type {import('@astryxdesign/cli/authoring').ReferenceDoc} */
|
|
@@ -13,7 +14,7 @@ export const docs = {
|
|
|
13
14
|
placement: {parent: 'namespace:docs', slot: 'guides', order: 40},
|
|
14
15
|
title: 'Extend or replace a topic',
|
|
15
16
|
category: 'guide',
|
|
16
|
-
description: 'Take over a topic, or merge sections into it.',
|
|
17
|
+
description: 'Take over a topic or guide, or merge sections into it.',
|
|
17
18
|
sections: [
|
|
18
19
|
{
|
|
19
20
|
id: 'replace-a-topic',
|
|
@@ -26,7 +27,7 @@ export const docs = {
|
|
|
26
27
|
{
|
|
27
28
|
type: 'code',
|
|
28
29
|
lang: 'bash',
|
|
29
|
-
code: '
|
|
30
|
+
code: '{@command integration add doc acme-getting-started --replaces getting-started}\n# The old name now opens your topic\n{@command docs getting-started}',
|
|
30
31
|
},
|
|
31
32
|
{
|
|
32
33
|
type: 'code',
|
|
@@ -51,7 +52,7 @@ export const docs = {
|
|
|
51
52
|
{
|
|
52
53
|
type: 'code',
|
|
53
54
|
lang: 'bash',
|
|
54
|
-
code: '
|
|
55
|
+
code: '{@command integration add doc acme-theming --extends theme}\n{@command docs theme --index}',
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
type: 'code',
|
|
@@ -63,7 +64,8 @@ export const docs = {
|
|
|
63
64
|
type: 'list',
|
|
64
65
|
style: 'unordered',
|
|
65
66
|
items: [
|
|
66
|
-
"Read the base topic's keys with `--index`, and give a section that replaces one that key as its `id`. A section without an `id` matches only a base section with exactly its title, or one whose `id` is the key its title makes, so `Integration Themes` is added beside a base `Integration themes` that has no `id`.",
|
|
67
|
+
"Read the base topic's keys with `--index`, and give a section that replaces one that key as its `id`. A section that replaces one keeps its place. A section without an `id` matches only a base section with exactly its title, or one whose `id` is the key its title makes, so `Integration Themes` is added beside a base `Integration themes` that has no `id`.",
|
|
68
|
+
"Set `before` or `after` to a base section's key to add a new section there instead of at the end. A key that names no section adds it at the end, and `astryx doctor integration validate` lists a note. An older CLI rejects these fields, so declare an `@astryxdesign/cli` peer range that starts at the release that reads them; `astryx integration verify` warns without it.",
|
|
67
69
|
"The topic keeps the base's title and description, and readers open it by the base's name.",
|
|
68
70
|
'Replace the `Overview` placeholder that `integration add` writes, or it is added to the base topic.',
|
|
69
71
|
"Extend a topic to correct or add to it. A copy made with `replaces` stops getting the owner's fixes.",
|
|
@@ -71,6 +73,36 @@ export const docs = {
|
|
|
71
73
|
},
|
|
72
74
|
],
|
|
73
75
|
},
|
|
76
|
+
{
|
|
77
|
+
id: 'replace-or-extend-a-cli-guide',
|
|
78
|
+
title: 'Replace or extend a CLI guide',
|
|
79
|
+
content: [
|
|
80
|
+
{
|
|
81
|
+
type: 'prose',
|
|
82
|
+
text: "A guide in the CLI's docs tree has a route rather than a topic name. Set `replaces` or `extends` to that route to change the guide for every app that installs your package: say what differs for your users on the page agents already read.",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: 'code',
|
|
86
|
+
lang: 'javascript',
|
|
87
|
+
label: 'docs/acme-quick-start.doc.mjs',
|
|
88
|
+
code: "export default {\n type: 'generic',\n name: 'acme-quick-start',\n extends: 'authoring/quick-start',\n title: 'Acme quick start',\n description: 'What differs when you build integrations at Acme.',\n sections: [\n {id: 'use-the-acme-registry', title: 'Use the Acme registry', before: 'fill-in-package-json', content: [/* ... */]},\n ],\n};",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'list',
|
|
92
|
+
style: 'unordered',
|
|
93
|
+
items: [
|
|
94
|
+
'Your doc stays a flat topic: do not give it a `placement`. Readers open the guide by its route, never by your `name`.',
|
|
95
|
+
'With `replaces`, readers of the route get your doc, under your package. With `extends`, each section you add or replace names your package.',
|
|
96
|
+
'A name that holds no topic or guide, such as a namespace, changes nothing; `astryx doctor integration validate` lists it as a note, with the guides below a namespace.',
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'code',
|
|
101
|
+
lang: 'bash',
|
|
102
|
+
code: '# Every guide route, by namespace\nastryx docs authoring --depth all\nastryx docs cli --depth all\n# The keys to place sections by\nastryx docs authoring/quick-start --index',
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
74
106
|
{
|
|
75
107
|
id: 'check-overlaps-with-core-topics',
|
|
76
108
|
title: 'Check overlaps with Core topics',
|
|
@@ -82,7 +114,7 @@ export const docs = {
|
|
|
82
114
|
{
|
|
83
115
|
type: 'code',
|
|
84
116
|
lang: 'bash',
|
|
85
|
-
code: '
|
|
117
|
+
code: '{@command doctor integration docs}',
|
|
86
118
|
},
|
|
87
119
|
{
|
|
88
120
|
type: 'code',
|
|
@@ -60,7 +60,7 @@ export const docs = {
|
|
|
60
60
|
content: [
|
|
61
61
|
{
|
|
62
62
|
type: 'prose',
|
|
63
|
-
text:
|
|
63
|
+
text: "Astryx never loads font files. defineTheme and the built CSS only set font-family: naming a webfont (Fraunces, JetBrains Mono, and so on) makes every browser look for it, and quietly fall back when the app has not loaded it. `{@command theme build}` warns when a theme names families that are neither CSS generics nor common system fonts and prints the snippet to add; loading the font is always the app's job.",
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
type: 'code',
|
|
@@ -40,7 +40,7 @@ export const docs = {
|
|
|
40
40
|
type: 'code',
|
|
41
41
|
lang: 'bash',
|
|
42
42
|
code: `# Print the palette without writing files
|
|
43
|
-
|
|
43
|
+
{@command theme palette generate themes/ocean/palette.config.json}
|
|
44
44
|
# Write the palette and its receipt
|
|
45
45
|
astryx theme palette generate themes/ocean/palette.config.json \\
|
|
46
46
|
--out themes/ocean/tokens/ocean.palette.ts`,
|
|
@@ -37,11 +37,11 @@ export const docs = {
|
|
|
37
37
|
content: [
|
|
38
38
|
{
|
|
39
39
|
type: 'prose',
|
|
40
|
-
text: 'Your `@astryxdesign/core` (and, if you use it, `@astryxdesign/cli`) `peerDependencies` ranges must include the version of the CLI installed globally. If they do not, Astryx skips your package outside projects, and `
|
|
40
|
+
text: 'Your `@astryxdesign/core` (and, if you use it, `@astryxdesign/cli`) `peerDependencies` ranges must include the version of the CLI installed globally. If they do not, Astryx skips your package outside projects, and `{@command doctor}` warns and names the range.',
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
type: 'prose',
|
|
44
|
-
text: "Inside a project that does not install your package, `
|
|
44
|
+
text: "Inside a project that does not install your package, `{@command discover}` offers it, with the command that adds it to that project, once your peer range admits the project's release.",
|
|
45
45
|
},
|
|
46
46
|
],
|
|
47
47
|
},
|
|
@@ -54,8 +54,8 @@ export const docs = {
|
|
|
54
54
|
style: 'unordered',
|
|
55
55
|
items: [
|
|
56
56
|
"Installed in an app: it works in that app, as always, whichever `astryx` the person runs, because the app's version of Astryx answers there.",
|
|
57
|
-
'Installed next to the global install (`
|
|
58
|
-
"Installed only globally, inside an app that does not install it: it adds nothing there. When it supports the app's version and loads, `
|
|
57
|
+
'Installed next to the global install (`{@pm install @astryxdesign/cli your-package --global}`), or in the same folder as the CLI by a tool that installs them together: it works in every folder outside a project. People and agents there see its components, templates, docs, themes, codemods, and discover source.',
|
|
58
|
+
"Installed only globally, inside an app that does not install it: it adds nothing there. When it supports the app's version and loads, `{@command discover}` lists it as one the app could add, with the app's install command.",
|
|
59
59
|
"Installed both ways: the app's copy is the one used in that app. In your own package folder, your working copy is used.",
|
|
60
60
|
],
|
|
61
61
|
},
|
|
@@ -73,7 +73,7 @@ export const docs = {
|
|
|
73
73
|
type: 'list',
|
|
74
74
|
style: 'unordered',
|
|
75
75
|
items: [
|
|
76
|
-
'Declare the `@astryxdesign/core` (and, if you use it, `@astryxdesign/cli`) `peerDependencies` range your package really supports. Outside a project, Astryx skips your package when that range leaves out the global version, and `
|
|
76
|
+
'Declare the `@astryxdesign/core` (and, if you use it, `@astryxdesign/cli`) `peerDependencies` range your package really supports. Outside a project, Astryx skips your package when that range leaves out the global version, and `{@command doctor}` says why: too narrow, and global users lose it after an upgrade; too wide, and it loads against a Core it may not build with.',
|
|
77
77
|
'Keep imports in your docs and templates to packages an app installs with yours, since outside a project there is no app to check them against.',
|
|
78
78
|
"If you set `cliCommand`, know that outside a project it starts every command Astryx prints, and that two global integrations naming different commands cancel out, falling back to `astryx` ({@link generic:cli-command}). Inside an app, only the app's integrations count.",
|
|
79
79
|
'Try it globally before you publish, with the steps below.',
|
|
@@ -92,21 +92,21 @@ export const docs = {
|
|
|
92
92
|
{
|
|
93
93
|
type: 'code',
|
|
94
94
|
lang: 'bash',
|
|
95
|
-
code: 'npm pack\
|
|
95
|
+
code: '{@pm-only npm "the tarball the registry receives" pack}\n{@pm install @astryxdesign/cli ./your-package-1.0.0.tgz --global}\nmkdir -p /tmp/try-global && cd /tmp/try-global\n{@command discover}\n{@command docs}\n{@command doctor}',
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
type: 'list',
|
|
99
99
|
style: 'unordered',
|
|
100
100
|
items: [
|
|
101
|
-
'`
|
|
102
|
-
'`
|
|
103
|
-
"`
|
|
104
|
-
"In an app that does not install it, `
|
|
101
|
+
'`{@command discover}` lists your package as installed, with what it adds.',
|
|
102
|
+
'`{@command docs}` lists your topics, and `{@command search <one of your component names>}` finds them.',
|
|
103
|
+
"`{@command doctor}`'s `computer-integrations` check lists your package as used, with no warning.",
|
|
104
|
+
"In an app that does not install it, `{@command discover}` lists it as one the app could add, with the app's install command, and none of its components or docs show up.",
|
|
105
105
|
],
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
type: 'prose',
|
|
109
|
-
text: 'Remove it again with `
|
|
109
|
+
text: 'Remove it again with `{@pm remove your-package --global}`.',
|
|
110
110
|
},
|
|
111
111
|
],
|
|
112
112
|
},
|
|
@@ -42,7 +42,7 @@ export const docs = {
|
|
|
42
42
|
{
|
|
43
43
|
type: 'code',
|
|
44
44
|
lang: 'bash',
|
|
45
|
-
code: '
|
|
45
|
+
code: '{@pm install @astryxdesign/cli --global}',
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
type: 'heading',
|
|
@@ -73,7 +73,7 @@ export const docs = {
|
|
|
73
73
|
],
|
|
74
74
|
['Outside any project', 'Your global version.'],
|
|
75
75
|
[
|
|
76
|
-
'Commands for your computer, such as `
|
|
76
|
+
'Commands for your computer, such as `{@command init --user}`',
|
|
77
77
|
'Your global version, in any folder.',
|
|
78
78
|
],
|
|
79
79
|
],
|
|
@@ -44,11 +44,11 @@ export const docs = {
|
|
|
44
44
|
{
|
|
45
45
|
type: 'code',
|
|
46
46
|
lang: 'bash',
|
|
47
|
-
code: '
|
|
47
|
+
code: '{@pm install @astryxdesign/cli --global}\n# with Volta: volta install @astryxdesign/cli',
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
type: 'prose',
|
|
51
|
-
text: "Keep the CLI installed in each project too: that pins its version for teammates and CI ({@link generic:project-global-or-both}). Inside a project, whichever astryx command you type, the project's version answers. Outside a project, your global install answers with its own version, and a version you name, such as `
|
|
51
|
+
text: "Keep the CLI installed in each project too: that pins its version for teammates and CI ({@link generic:project-global-or-both}). Inside a project, whichever astryx command you type, the project's version answers. Outside a project, your global install answers with its own version, and a version you name, such as `{@pm dlx @astryxdesign/cli@0.7.0}`, answers as exactly that version.",
|
|
52
52
|
},
|
|
53
53
|
],
|
|
54
54
|
},
|
|
@@ -63,7 +63,7 @@ export const docs = {
|
|
|
63
63
|
{
|
|
64
64
|
type: 'code',
|
|
65
65
|
lang: 'bash',
|
|
66
|
-
code: 'npm config set prefix ~/.npm-global\nexport PATH="$HOME/.npm-global/bin:$PATH"\
|
|
66
|
+
code: '{@pm-only npm "moves the npm global folder" config set prefix ~/.npm-global}\nexport PATH="$HOME/.npm-global/bin:$PATH"\n{@pm-only npm "installs into the npm global folder above" i -g @astryxdesign/cli}',
|
|
67
67
|
},
|
|
68
68
|
{
|
|
69
69
|
type: 'prose',
|
|
@@ -87,7 +87,7 @@ export const docs = {
|
|
|
87
87
|
content: [
|
|
88
88
|
{
|
|
89
89
|
type: 'prose',
|
|
90
|
-
text: "Your global install answers offline in a project with only Core, and so does any project that installs its own CLI. Outside a project, commands that read components, such as `
|
|
90
|
+
text: "Your global install answers offline in a project with only Core, and so does any project that installs its own CLI. Outside a project, commands that read components, such as `{@command component Button}`, need your global version's Core: after any command you run online, your global install downloads it once into the cache in the background, so they work offline from then on (not in CI, where nothing downloads by itself: {@link generic:ci-and-containers}; and not on Windows, where the first component command downloads it). Only a project whose own CLI cannot start needs a version installed or cached; when it is neither and cannot be fetched, your global install answers with a one-line warning, and Astryx waits 2 minutes before trying to download it again (10 minutes after a second failure in a row). {@link generic:problems} has the exact message.",
|
|
91
91
|
},
|
|
92
92
|
],
|
|
93
93
|
},
|
|
@@ -46,7 +46,7 @@ export const docs = {
|
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
type: 'prose',
|
|
49
|
-
text: 'This guide decides layout, not component APIs. Run `
|
|
49
|
+
text: 'This guide decides layout, not component APIs. Run `{@command build "<idea>"}` to start from the closest template for your app type, and `{@command component <Name>}` for a component\'s props.',
|
|
50
50
|
},
|
|
51
51
|
],
|
|
52
52
|
slots: {
|
|
@@ -38,7 +38,7 @@ export const docs = {
|
|
|
38
38
|
style: 'unordered',
|
|
39
39
|
items: [
|
|
40
40
|
'The kind is `generic` for a topic or guide, `namespace` for a docs section, `command` or `function` for a CLI command or API function, `schema` or `enum` for a schema or a fixed set of values, `component` for a component, and `page` or `block` for a template.',
|
|
41
|
-
'Name a component by its export name and a template by its id. Its link reads as the command that opens it, such as `
|
|
41
|
+
'Name a component by its export name and a template by its id. Its link reads as the command that opens it, such as `{@command component AcmeCarousel --package @acme/widgets}`.',
|
|
42
42
|
'Inside backticks or a code block, link syntax prints as written.',
|
|
43
43
|
],
|
|
44
44
|
},
|
|
@@ -78,7 +78,7 @@ export const docs = {
|
|
|
78
78
|
{
|
|
79
79
|
type: 'code',
|
|
80
80
|
lang: 'bash',
|
|
81
|
-
code: '
|
|
81
|
+
code: '{@command doctor integration docs}',
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
type: 'code',
|
|
@@ -46,7 +46,7 @@ export const docs = {
|
|
|
46
46
|
type: 'list',
|
|
47
47
|
style: 'ordered',
|
|
48
48
|
items: [
|
|
49
|
-
'Install the packages and run `
|
|
49
|
+
'Install the packages and run `{@command init}` for agent docs, then add the reset, `astryx.css`, and theme CSS imports (see Theme and CSS Setup below).',
|
|
50
50
|
'Wrap the app root with Theme and choose the initial light, dark, or system mode behavior.',
|
|
51
51
|
'Make Tailwind and design system CSS layer order explicit before replacing components.',
|
|
52
52
|
'Render the foundation smoke test page and confirm primitives keep their padding before migrating any surface.',
|
|
@@ -70,18 +70,18 @@ export const docs = {
|
|
|
70
70
|
type: 'code',
|
|
71
71
|
lang: 'bash',
|
|
72
72
|
label: 'Migration-oriented CLI pass',
|
|
73
|
-
code: `
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
73
|
+
code: `{@command docs migration}
|
|
74
|
+
{@command docs theme}
|
|
75
|
+
{@command docs styling}
|
|
76
|
+
{@command template --list --type block}
|
|
77
|
+
{@command template AppShellTopNavWithSideNav --skeleton}
|
|
78
|
+
{@command template PopoverSettingsPanel --skeleton}
|
|
79
|
+
{@command component AppShell}
|
|
80
|
+
{@command component SideNav}
|
|
81
|
+
{@command component TopNav}
|
|
82
|
+
{@command component CommandPalette}
|
|
83
|
+
{@command component Button}
|
|
84
|
+
{@command component TextInput}`,
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
type: 'prose',
|
|
@@ -91,8 +91,8 @@ astryx component TextInput`,
|
|
|
91
91
|
type: 'code',
|
|
92
92
|
lang: 'bash',
|
|
93
93
|
label: 'Short and JSON modes',
|
|
94
|
-
code: `
|
|
95
|
-
|
|
94
|
+
code: `{@command docs migration --full --detail brief}
|
|
95
|
+
{@command component Button --json}`,
|
|
96
96
|
},
|
|
97
97
|
],
|
|
98
98
|
},
|
|
@@ -10,11 +10,12 @@
|
|
|
10
10
|
export const docs = {
|
|
11
11
|
type: 'namespace',
|
|
12
12
|
name: 'migration',
|
|
13
|
-
title: 'Migration
|
|
13
|
+
title: 'Migration',
|
|
14
14
|
summary:
|
|
15
15
|
'Migrate an existing Tailwind, shadcn, or Radix app to the design system incrementally — setup, component replacement, and verification.',
|
|
16
16
|
keywords: [
|
|
17
17
|
'migration',
|
|
18
|
+
'migration guide',
|
|
18
19
|
'migrate',
|
|
19
20
|
'Tailwind',
|
|
20
21
|
'shadcn',
|
|
@@ -205,7 +205,7 @@ tokens: {
|
|
|
205
205
|
type: 'list',
|
|
206
206
|
style: 'ordered',
|
|
207
207
|
items: [
|
|
208
|
-
'Import the reset/base CSS and a theme CSS file early enough for first paint. For production SSR, prefer built themes from `
|
|
208
|
+
'Import the reset/base CSS and a theme CSS file early enough for first paint. For production SSR, prefer built themes from `{@command theme build}` or published `/built` theme imports plus `theme.css`.',
|
|
209
209
|
'Choose one owner for color mode. Theme uses `data-theme="light|dark"` and `color-scheme` to resolve `light-dark()` tokens.',
|
|
210
210
|
'Map the external library\'s semantic layer to system variables by intent, not by exact naming. For example, MUI `background.paper` maps to `--color-background-surface`.',
|
|
211
211
|
'Use {@link namespace:tokens} and focused token docs when building mappings. Keep mappings small at first: text, surface/body/card/popover, border, accent, status, spacing, radius, typography, shadow.',
|
|
@@ -17,7 +17,7 @@ export const docs = {
|
|
|
17
17
|
title: 'Page template',
|
|
18
18
|
category: 'guide',
|
|
19
19
|
description:
|
|
20
|
-
'Help people find a page: give it a category for `
|
|
20
|
+
'Help people find a page: give it a category for `{@command search}` and template listings, and flag a sparse starting shell as a scaffold.',
|
|
21
21
|
sections: [
|
|
22
22
|
{
|
|
23
23
|
id: 'start-from-the-generated-page-doc',
|
|
@@ -56,7 +56,7 @@ export default {
|
|
|
56
56
|
type: 'list',
|
|
57
57
|
style: 'unordered',
|
|
58
58
|
items: [
|
|
59
|
-
'Set `category` to the most specific supported `{Group} - {Variant}` value. Its words become search terms for `
|
|
59
|
+
'Set `category` to the most specific supported `{Group} - {Variant}` value. Its words become search terms for `{@command search}`, and it appears in the JSON template list.',
|
|
60
60
|
'Set `scaffold: true` only for a deliberately sparse starting shell. The JSON template list reports it, so tools and galleries can tell a scaffold from a finished page.',
|
|
61
61
|
"Fields that only Astryx's own gallery reads, such as `isHiddenFromOverview`, have no effect on integration templates.",
|
|
62
62
|
],
|
|
@@ -92,7 +92,7 @@ export const docs = {
|
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
type: 'prose',
|
|
95
|
-
text: "The first astryx command on your PATH is a version from before global mode, so it ignores your projects' versions. Run the command shown, or remove that install. `
|
|
95
|
+
text: "The first astryx command on your PATH is a version from before global mode, so it ignores your projects' versions. Run the command shown, or remove that install. `{@command doctor}` lists every astryx command on your PATH in its `cli-on-path` check.",
|
|
96
96
|
},
|
|
97
97
|
],
|
|
98
98
|
},
|
|
@@ -126,12 +126,12 @@ export const docs = {
|
|
|
126
126
|
content: [
|
|
127
127
|
{
|
|
128
128
|
type: 'prose',
|
|
129
|
-
text: "Astryx treats a copy as installed for your computer only when your package manager's own settings name its folder: npm's global prefix, Bun's `BUN_INSTALL`, Yarn's `global-folder`, pnpm's `PNPM_HOME`, or their defaults. A folder chosen only with a one-off flag, such as `yarn global add --global-folder ~/mine`, is not in any setting, so Astryx treats that copy like a project's: no daily update check and no agent guide. Save the folder in your settings so Astryx knows it is a global install:",
|
|
129
|
+
text: "Astryx treats a copy as installed for your computer only when your package manager's own settings name its folder: npm's global prefix, Bun's `BUN_INSTALL`, Yarn's `global-folder`, pnpm's `PNPM_HOME`, or their defaults. A folder chosen only with a one-off flag, such as `{@pm-only yarn-classic \"uses the Yarn 1 global folder\" global add --global-folder ~/mine}`, is not in any setting, so Astryx treats that copy like a project's: no daily update check and no agent guide. Save the folder in your settings so Astryx knows it is a global install:",
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
type: 'code',
|
|
133
133
|
lang: 'bash',
|
|
134
|
-
code: 'yarn config set global-folder ~/mine # writes ~/.yarnrc\nexport BUN_INSTALL=~/mybun # in your shell profile, for Bun',
|
|
134
|
+
code: '{@pm-only yarn-classic "uses the Yarn 1 global folder" config set global-folder ~/mine} # writes ~/.yarnrc\nexport BUN_INSTALL=~/mybun # in your shell profile, for Bun',
|
|
135
135
|
},
|
|
136
136
|
],
|
|
137
137
|
},
|
|
@@ -145,7 +145,7 @@ export const docs = {
|
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
type: 'prose',
|
|
148
|
-
text: "In a project with nothing installed yet, such as a fresh clone, the same commands use that Core too, and offline the error reads `This project has no Core installed, and Core <version> could not be downloaded`: install the project's dependencies (`
|
|
148
|
+
text: "In a project with nothing installed yet, such as a fresh clone, the same commands use that Core too, and offline the error reads `This project has no Core installed, and Core <version> could not be downloaded`: install the project's dependencies (`{@pm install}`, or your package manager's), and the project's own Core answers from then on.",
|
|
149
149
|
},
|
|
150
150
|
],
|
|
151
151
|
},
|
|
@@ -182,11 +182,11 @@ export const docs = {
|
|
|
182
182
|
type: 'list',
|
|
183
183
|
style: 'unordered',
|
|
184
184
|
items: [
|
|
185
|
-
'`npm i -g` fails with `EACCES` (permission denied): do not use `sudo`. Use a Node version manager, or give npm a global folder you own: `npm config set prefix ~/.npm-global`, then add `~/.npm-global/bin` to your PATH.',
|
|
186
|
-
|
|
187
|
-
'`pnpm add -g` stops with `ERR_PNPM_NO_GLOBAL_BIN_DIR`, often with Corepack: run `pnpm setup`, open a new terminal, and try again. Yarn 2 and later have no `yarn global`; use `npm i -g` instead.',
|
|
185
|
+
'`npm i -g` fails with `EACCES` (permission denied): do not use `sudo`. Use a Node version manager, or give npm a global folder you own: `{@pm-only npm "moves the npm global folder" config set prefix ~/.npm-global}`, then add `~/.npm-global/bin` to your PATH.',
|
|
186
|
+
'`astryx: command not found` after installing: your package manager\'s global bin folder is not on your PATH. `{@pm-only npm "prints the npm global folder" prefix -g}` shows npm\'s (its `bin` folder on macOS and Linux); `{@pm-only pnpm "sets up the pnpm global folder" setup}` adds pnpm\'s.',
|
|
187
|
+
'`pnpm add -g` stops with `ERR_PNPM_NO_GLOBAL_BIN_DIR`, often with Corepack: run `{@pm-only pnpm "sets up the pnpm global folder" setup}`, open a new terminal, and try again. Yarn 2 and later have no `yarn global`; use `npm i -g` instead.',
|
|
188
188
|
'Windows: npm puts `astryx.cmd` in `%APPDATA%\\npm`, which must be on your PATH. If PowerShell says running scripts is disabled, run `astryx.cmd`, or allow scripts for your user with `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`.',
|
|
189
|
-
'Two installs, and the wrong one runs: `
|
|
189
|
+
'Two installs, and the wrong one runs: `{@command doctor}` outside a project lists every astryx command on your PATH, in the order your shell tries them.',
|
|
190
190
|
],
|
|
191
191
|
},
|
|
192
192
|
],
|
|
@@ -90,7 +90,7 @@ export const docs = {
|
|
|
90
90
|
{
|
|
91
91
|
type: 'code',
|
|
92
92
|
lang: 'bash',
|
|
93
|
-
code: '
|
|
93
|
+
code: '{@pm install @astryxdesign/core @astryxdesign/cli}\n{@command init}',
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
96
|
type: 'prose',
|
|
@@ -99,7 +99,7 @@ export const docs = {
|
|
|
99
99
|
{
|
|
100
100
|
type: 'code',
|
|
101
101
|
lang: 'bash',
|
|
102
|
-
code: '
|
|
102
|
+
code: '{@pm install @astryxdesign/cli --global}',
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
type: 'prose',
|
|
@@ -22,12 +22,12 @@ export const docs = {
|
|
|
22
22
|
content: [
|
|
23
23
|
{
|
|
24
24
|
type: 'prose',
|
|
25
|
-
text: 'Publish only a package that passes every check, then preview the upload with `npm publish --dry-run`. The dry run lists the files and the tag without uploading.',
|
|
25
|
+
text: 'Publish only a package that passes every check, then preview the upload with `{@pm-only npm "publishing goes through npm, which every Node install carries" publish --dry-run}`. The dry run lists the files and the tag without uploading.',
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
28
|
type: 'code',
|
|
29
29
|
lang: 'bash',
|
|
30
|
-
code: '
|
|
30
|
+
code: '{@command doctor integration validate} && {@command doctor integration components} && {@command doctor integration templates} && {@command doctor integration docs} && {@command integration verify}\n{@pm-only npm "publishing goes through npm, which every Node install carries" publish --dry-run --access public}',
|
|
31
31
|
},
|
|
32
32
|
{
|
|
33
33
|
type: 'code',
|
|
@@ -51,7 +51,7 @@ export const docs = {
|
|
|
51
51
|
{
|
|
52
52
|
type: 'code',
|
|
53
53
|
lang: 'bash',
|
|
54
|
-
code: "npm pkg set 'files[]=components' 'files[]=templates' 'files[]=themes' 'files[]=docs' 'files[]=codemods' 'files[]=astryx.integration.mjs'\
|
|
54
|
+
code: "{@pm-only npm \"edits package.json\" pkg set 'files[]=components' 'files[]=templates' 'files[]=themes' 'files[]=docs' 'files[]=codemods' 'files[]=astryx.integration.mjs'}\n{@pm-only npm \"builds the tarball npm publishes\" pack --dry-run}",
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
type: 'list',
|
|
@@ -70,12 +70,12 @@ export const docs = {
|
|
|
70
70
|
content: [
|
|
71
71
|
{
|
|
72
72
|
type: 'prose',
|
|
73
|
-
text: 'A scoped package is private by default, so publish it with `--access public`. Without `--tag`, npm tags the release `latest`, which is what `
|
|
73
|
+
text: 'A scoped package is private by default, so publish it with `--access public`. Without `--tag`, npm tags the release `latest`, which is what `{@pm install @acme/astryx-widgets}` installs.',
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
76
|
type: 'code',
|
|
77
77
|
lang: 'bash',
|
|
78
|
-
code: '# Publish a release\
|
|
78
|
+
code: '# Publish a release\n{@pm-only npm "publishing goes through npm, which every Node install carries" publish --access public}\n\n# Or set the access once in package.json\n{@pm-only npm "Yarn has no pkg command" pkg set publishConfig.access=public}',
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
type: 'prose',
|
|
@@ -84,7 +84,7 @@ export const docs = {
|
|
|
84
84
|
{
|
|
85
85
|
type: 'code',
|
|
86
86
|
lang: 'bash',
|
|
87
|
-
code: '# Only apps that ask for next get it: npm install @acme/astryx-widgets@next\
|
|
87
|
+
code: '# Only apps that ask for next get it: npm install @acme/astryx-widgets@next\n{@pm-only npm "publishing goes through npm, which every Node install carries" publish --tag next}\n\n# Make that version the default\n{@pm-only npm "dist-tags are set with npm, which every Node install carries" dist-tag add @acme/astryx-widgets@1.1.0 latest}\n{@pm-only npm "dist-tags are set with npm, which every Node install carries" dist-tag ls @acme/astryx-widgets}',
|
|
88
88
|
},
|
|
89
89
|
],
|
|
90
90
|
},
|
|
@@ -99,7 +99,7 @@ export const docs = {
|
|
|
99
99
|
{
|
|
100
100
|
type: 'code',
|
|
101
101
|
lang: 'bash',
|
|
102
|
-
code: 'mkdir check-release && cd check-release\
|
|
102
|
+
code: 'mkdir check-release && cd check-release\n{@pm-only npm "npm, which every Node install carries, writes the package.json" init -y}\n{@pm install @astryxdesign/core @astryxdesign/cli @acme/astryx-widgets@1.0.0}\n{@command component AcmeCarousel}\n{@command doctor integration validate @acme/astryx-widgets}',
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
type: 'prose',
|
|
@@ -39,13 +39,13 @@ export const docs = {
|
|
|
39
39
|
{
|
|
40
40
|
type: 'code',
|
|
41
41
|
lang: 'bash',
|
|
42
|
-
code:
|
|
42
|
+
code: 'mkdir acme-widgets && cd acme-widgets\n{@pm-only npm "writes package.json" init -y}\n{@pm-only npm "edits package.json" pkg set name=@acme/astryx-widgets type=module}\n{@pm-only npm "edits package.json" pkg set \'exports={}\' --json}\n{@pm install @astryxdesign/cli @astryxdesign/core typescript@6 --dev}',
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
type: 'list',
|
|
46
46
|
style: 'unordered',
|
|
47
47
|
items: [
|
|
48
|
-
'Set `"type": "module"`: the `.js` files the CLI generates, such as a built theme, are ES modules, and Node fails to load them in a package marked `"type": "commonjs"`, which `npm init -y` writes on npm 11.',
|
|
48
|
+
'Set `"type": "module"`: the `.js` files the CLI generates, such as a built theme, are ES modules, and Node fails to load them in a package marked `"type": "commonjs"`, which `{@pm-only npm "writes package.json" init -y}` writes on npm 11.',
|
|
49
49
|
'Start with `"exports": {}`: each component and template you add then writes the public import that `integration verify` resolves.',
|
|
50
50
|
'Run the CLI as `astryx`, which runs the `@astryxdesign/cli` you installed as a devDependency.',
|
|
51
51
|
'Component commands read Core, so they need `@astryxdesign/core` installed.',
|
|
@@ -64,7 +64,7 @@ export const docs = {
|
|
|
64
64
|
{
|
|
65
65
|
type: 'code',
|
|
66
66
|
lang: 'bash',
|
|
67
|
-
code: '
|
|
67
|
+
code: '{@command integration add component AcmeCarousel}',
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
type: 'code',
|
|
@@ -82,7 +82,7 @@ export const docs = {
|
|
|
82
82
|
{
|
|
83
83
|
type: 'code',
|
|
84
84
|
lang: 'bash',
|
|
85
|
-
code: '
|
|
85
|
+
code: '{@command component AcmeCarousel}',
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
type: 'prose',
|
|
@@ -100,7 +100,7 @@ export const docs = {
|
|
|
100
100
|
{
|
|
101
101
|
type: 'code',
|
|
102
102
|
lang: 'bash',
|
|
103
|
-
code: 'npm pkg set scripts.typecheck="astryx integration check --strict"\
|
|
103
|
+
code: '{@pm-only npm "edits package.json" pkg set scripts.typecheck="astryx integration check --strict"}\n{@pm run typecheck}',
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
106
|
type: 'code',
|
|
@@ -127,7 +127,7 @@ export const docs = {
|
|
|
127
127
|
{
|
|
128
128
|
type: 'code',
|
|
129
129
|
lang: 'bash',
|
|
130
|
-
code: '
|
|
130
|
+
code: '{@command integration verify}\n{@pm-only npm "builds the publish tarball" pack --pack-destination ..}',
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
type: 'code',
|
|
@@ -136,7 +136,7 @@ export const docs = {
|
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
type: 'prose',
|
|
139
|
-
text: '`integration verify` installs the packed package in a temporary app and confirms the component resolves through its public import there ({@link generic:checks}). It publishes nothing and leaves no `.tgz` file, so `npm pack` writes `../acme-astryx-widgets-1.0.0.tgz` for the next step.',
|
|
139
|
+
text: '`integration verify` installs the packed package in a temporary app and confirms the component resolves through its public import there ({@link generic:checks}). It publishes nothing and leaves no `.tgz` file, so `{@pm-only npm "builds the publish tarball" pack}` writes `../acme-astryx-widgets-1.0.0.tgz` for the next step.',
|
|
140
140
|
},
|
|
141
141
|
{
|
|
142
142
|
type: 'heading',
|
|
@@ -150,7 +150,7 @@ export const docs = {
|
|
|
150
150
|
{
|
|
151
151
|
type: 'code',
|
|
152
152
|
lang: 'bash',
|
|
153
|
-
code: 'cd ..\nmkdir my-app && cd my-app\
|
|
153
|
+
code: 'cd ..\nmkdir my-app && cd my-app\n{@pm-only npm "writes package.json" init -y}\n{@pm install @astryxdesign/core @astryxdesign/cli ../acme-astryx-widgets-1.0.0.tgz}\n{@command component AcmeCarousel}',
|
|
154
154
|
},
|
|
155
155
|
{
|
|
156
156
|
type: 'code',
|
|
@@ -290,7 +290,7 @@ export const docs = {
|
|
|
290
290
|
content: [
|
|
291
291
|
{
|
|
292
292
|
type: 'prose',
|
|
293
|
-
text: 'In global mode: users can also install your package for their computer, beside the global CLI (`
|
|
293
|
+
text: 'In global mode: users can also install your package for their computer, beside the global CLI (`{@pm install @astryxdesign/cli your-package --global}`). It then applies in folders outside any project, and inside a project only if the project installs it. See {@link namespace:global} and {@link generic:global-integrations}.',
|
|
294
294
|
},
|
|
295
295
|
],
|
|
296
296
|
},
|
|
@@ -62,7 +62,7 @@ export const docs = {
|
|
|
62
62
|
'`%APPDATA%\\astryx`',
|
|
63
63
|
],
|
|
64
64
|
[
|
|
65
|
-
'Update checks and notices, and why the last notice or check did not happen (for `
|
|
65
|
+
'Update checks and notices, and why the last notice or check did not happen (for `{@command doctor}` only)',
|
|
66
66
|
'`<settings>/state.json`',
|
|
67
67
|
'`<settings>/state.json`',
|
|
68
68
|
'`<settings>\\state.json`',
|
|
@@ -128,7 +128,7 @@ export const docs = {
|
|
|
128
128
|
style: 'unordered',
|
|
129
129
|
items: [
|
|
130
130
|
"`meta.answeredBy` on every successful `--json` result: `cli` (the version that answered), `core` (the Core it used, or `null`), and `copy`: `project` (the project's own CLI), `starting` (the astryx command you started, in a project with no CLI of its own), `matched` (the CLI version equal to the project's Core, when the project's own CLI cannot start), `carried` (outside a project), or `fallback` (that version could not be obtained, so the astryx command you started answered instead).",
|
|
131
|
-
'`meta.available` entries from `
|
|
131
|
+
'`meta.available` entries from `{@command discover}` with `source: "installed for this computer"`: an integration installed next to your global install that the project could add, with its install command in `install`.',
|
|
132
132
|
],
|
|
133
133
|
},
|
|
134
134
|
],
|
|
@@ -103,7 +103,7 @@ export default {
|
|
|
103
103
|
{
|
|
104
104
|
type: 'code',
|
|
105
105
|
lang: 'bash',
|
|
106
|
-
code: '
|
|
106
|
+
code: '{@command doctor integration components}\n{@command component SideNav}\n{@command component AcmeSideNav}\n{@command component SideNav --package @astryxdesign/core}',
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
type: 'list',
|