@nimtech/nimpress 2.3.1
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/.claude/rules/changelog-entries.md +229 -0
- package/.claude/rules/chunk-cycles.md +23 -0
- package/.claude/rules/component-modules.md +152 -0
- package/.claude/rules/dbml-pages.md +118 -0
- package/.claude/rules/deploy.md +47 -0
- package/.claude/rules/doc-pages.md +93 -0
- package/.claude/rules/docs-authoring.md +90 -0
- package/.claude/rules/docs-sync.md +59 -0
- package/.claude/rules/file-layout.md +49 -0
- package/.claude/rules/frontmatter.md +91 -0
- package/.claude/rules/page-types.md +108 -0
- package/.claude/rules/paths.md +27 -0
- package/.claude/rules/roadmap-entries.md +154 -0
- package/.claude/rules/style.md +61 -0
- package/LICENSE +201 -0
- package/README.md +137 -0
- package/bin/nimpress.mjs +7 -0
- package/config.schema.json +555 -0
- package/dist/DbmlNote-CTwTd5vM.js +21 -0
- package/dist/DbmlTable-BXIyJnLV.js +209 -0
- package/dist/cli.es.js +1265 -0
- package/dist/nimpress.es.js +8896 -0
- package/dist/plugin-DQtunTIv.js +8268 -0
- package/dist/plugin.es.js +23 -0
- package/dist/src/api/CodeExamples.svelte.d.ts +1 -0
- package/dist/src/api/MethodBadge.svelte.d.ts +1 -0
- package/dist/src/api/OpenApiRoot.svelte.d.ts +1 -0
- package/dist/src/api/Operation.svelte.d.ts +1 -0
- package/dist/src/api/ParamRow.svelte.d.ts +1 -0
- package/dist/src/api/Schema.svelte.d.ts +1 -0
- package/dist/src/api/TryDialog.svelte.d.ts +1 -0
- package/dist/src/api/TryPanel.svelte.d.ts +1 -0
- package/dist/src/api/refs.d.ts +12 -0
- package/dist/src/api/refs.d.ts.map +1 -0
- package/dist/src/api/tryState.d.ts +21 -0
- package/dist/src/api/tryState.d.ts.map +1 -0
- package/dist/src/api/types.d.ts +63 -0
- package/dist/src/api/types.d.ts.map +1 -0
- package/dist/src/auth/AccountMenu.svelte.d.ts +1 -0
- package/dist/src/auth/guard.d.ts +5 -0
- package/dist/src/auth/guard.d.ts.map +1 -0
- package/dist/src/auth/session.d.ts +8 -0
- package/dist/src/auth/session.d.ts.map +1 -0
- package/dist/src/banner.d.ts +23 -0
- package/dist/src/banner.d.ts.map +1 -0
- package/dist/src/cli/export.d.ts +4 -0
- package/dist/src/cli/export.d.ts.map +1 -0
- package/dist/src/cli/guard.d.ts +3 -0
- package/dist/src/cli/guard.d.ts.map +1 -0
- package/dist/src/cli/init.d.ts +2 -0
- package/dist/src/cli/init.d.ts.map +1 -0
- package/dist/src/cli/lint.d.ts +11 -0
- package/dist/src/cli/lint.d.ts.map +1 -0
- package/dist/src/cli/modules.d.ts +3 -0
- package/dist/src/cli/modules.d.ts.map +1 -0
- package/dist/src/cli/shared.d.ts +6 -0
- package/dist/src/cli/shared.d.ts.map +1 -0
- package/dist/src/cli/site.d.ts +7 -0
- package/dist/src/cli/site.d.ts.map +1 -0
- package/dist/src/cli.d.ts +5 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/config/base.d.ts +4 -0
- package/dist/src/config/base.d.ts.map +1 -0
- package/dist/src/config/chunkCycles.d.ts +10 -0
- package/dist/src/config/chunkCycles.d.ts.map +1 -0
- package/dist/src/config/defaults.d.ts +4 -0
- package/dist/src/config/defaults.d.ts.map +1 -0
- package/dist/src/config/html.d.ts +3 -0
- package/dist/src/config/html.d.ts.map +1 -0
- package/dist/src/config/load.d.ts +20 -0
- package/dist/src/config/load.d.ts.map +1 -0
- package/dist/src/config/paths.d.ts +8 -0
- package/dist/src/config/paths.d.ts.map +1 -0
- package/dist/src/config/schema.d.ts +1238 -0
- package/dist/src/config/schema.d.ts.map +1 -0
- package/dist/src/config/viteConfig.d.ts +11 -0
- package/dist/src/config/viteConfig.d.ts.map +1 -0
- package/dist/src/dbml/erd.d.ts +59 -0
- package/dist/src/dbml/erd.d.ts.map +1 -0
- package/dist/src/framework/configStore.d.ts +7 -0
- package/dist/src/framework/configStore.d.ts.map +1 -0
- package/dist/src/framework/createNimpressApp.d.ts +10 -0
- package/dist/src/framework/createNimpressApp.d.ts.map +1 -0
- package/dist/src/framework/gated.d.ts +5 -0
- package/dist/src/framework/gated.d.ts.map +1 -0
- package/dist/src/framework/hashSpy.d.ts +7 -0
- package/dist/src/framework/hashSpy.d.ts.map +1 -0
- package/dist/src/framework/pageMeta.d.ts +4 -0
- package/dist/src/framework/pageMeta.d.ts.map +1 -0
- package/dist/src/framework/pageStyles.d.ts +2 -0
- package/dist/src/framework/pageStyles.d.ts.map +1 -0
- package/dist/src/framework/router.d.ts +5 -0
- package/dist/src/framework/router.d.ts.map +1 -0
- package/dist/src/framework/stores/feed.d.ts +8 -0
- package/dist/src/framework/stores/feed.d.ts.map +1 -0
- package/dist/src/framework/stores/sidebar.d.ts +4 -0
- package/dist/src/framework/stores/sidebar.d.ts.map +1 -0
- package/dist/src/framework/stores/theme.d.ts +6 -0
- package/dist/src/framework/stores/theme.d.ts.map +1 -0
- package/dist/src/framework/stores/viewer.d.ts +6 -0
- package/dist/src/framework/stores/viewer.d.ts.map +1 -0
- package/dist/src/icons/FullscreenIcon.svelte.d.ts +1 -0
- package/dist/src/icons/IconAdd.svelte.d.ts +1 -0
- package/dist/src/icons/IconChevron.svelte.d.ts +1 -0
- package/dist/src/icons/IconClear.svelte.d.ts +1 -0
- package/dist/src/icons/IconConsole.svelte.d.ts +1 -0
- package/dist/src/icons/IconDock.svelte.d.ts +1 -0
- package/dist/src/icons/IconDownload.svelte.d.ts +1 -0
- package/dist/src/icons/IconJson.svelte.d.ts +1 -0
- package/dist/src/icons/IconMinus.svelte.d.ts +1 -0
- package/dist/src/icons/IconMock.svelte.d.ts +1 -0
- package/dist/src/icons/IconMoon.svelte.d.ts +1 -0
- package/dist/src/icons/IconOpen.svelte.d.ts +1 -0
- package/dist/src/icons/IconReload.svelte.d.ts +1 -0
- package/dist/src/icons/IconRemove.svelte.d.ts +1 -0
- package/dist/src/icons/IconShadow.svelte.d.ts +1 -0
- package/dist/src/icons/IconSun.svelte.d.ts +1 -0
- package/dist/src/index.d.ts +44 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/layout/App.svelte.d.ts +1 -0
- package/dist/src/layout/AppRoot.svelte.d.ts +1 -0
- package/dist/src/layout/BackToTop.svelte.d.ts +1 -0
- package/dist/src/layout/Breadcrumbs.svelte.d.ts +1 -0
- package/dist/src/layout/GatedPage.svelte.d.ts +1 -0
- package/dist/src/layout/Header.svelte.d.ts +1 -0
- package/dist/src/layout/HomePage.svelte.d.ts +1 -0
- package/dist/src/layout/RightToc.svelte.d.ts +1 -0
- package/dist/src/layout/Sidebar.svelte.d.ts +1 -0
- package/dist/src/layout/SidebarNode.svelte.d.ts +1 -0
- package/dist/src/markdown/Actions.svelte.d.ts +1 -0
- package/dist/src/markdown/CalloutCheck.svelte.d.ts +1 -0
- package/dist/src/markdown/CalloutInfo.svelte.d.ts +1 -0
- package/dist/src/markdown/CalloutNote.svelte.d.ts +1 -0
- package/dist/src/markdown/CalloutTip.svelte.d.ts +1 -0
- package/dist/src/markdown/CalloutWarning.svelte.d.ts +1 -0
- package/dist/src/markdown/Card.svelte.d.ts +1 -0
- package/dist/src/markdown/CardGroup.svelte.d.ts +1 -0
- package/dist/src/markdown/ChangelogPage.svelte.d.ts +1 -0
- package/dist/src/markdown/CodeBlock.svelte.d.ts +1 -0
- package/dist/src/markdown/CodeEditor.svelte.d.ts +1 -0
- package/dist/src/markdown/CodeGroup.svelte.d.ts +1 -0
- package/dist/src/markdown/ComponentEmbed.svelte.d.ts +1 -0
- package/dist/src/markdown/ComponentPage.svelte.d.ts +1 -0
- package/dist/src/markdown/ControlNode.svelte.d.ts +1 -0
- package/dist/src/markdown/DBMLBlock.svelte.d.ts +1 -0
- package/dist/src/markdown/DbmlNote.svelte.d.ts +1 -0
- package/dist/src/markdown/DbmlPage.svelte.d.ts +1 -0
- package/dist/src/markdown/DbmlTable.svelte.d.ts +1 -0
- package/dist/src/markdown/DragDivider.svelte.d.ts +1 -0
- package/dist/src/markdown/Feature.svelte.d.ts +1 -0
- package/dist/src/markdown/FeatureGrid.svelte.d.ts +1 -0
- package/dist/src/markdown/HeroPage.svelte.d.ts +1 -0
- package/dist/src/markdown/MermaidBlock.svelte.d.ts +1 -0
- package/dist/src/markdown/Page.svelte.d.ts +1 -0
- package/dist/src/markdown/PlanetFooter.svelte.d.ts +1 -0
- package/dist/src/markdown/RoadmapBlob.svelte.d.ts +1 -0
- package/dist/src/markdown/RoadmapNode.svelte.d.ts +1 -0
- package/dist/src/markdown/RoadmapPage.svelte.d.ts +1 -0
- package/dist/src/markdown/SubscribeDialog.svelte.d.ts +1 -0
- package/dist/src/mock/index.d.ts +42 -0
- package/dist/src/mock/index.d.ts.map +1 -0
- package/dist/src/modules/autoStory.d.ts +5 -0
- package/dist/src/modules/autoStory.d.ts.map +1 -0
- package/dist/src/modules/componentData.d.ts +14 -0
- package/dist/src/modules/componentData.d.ts.map +1 -0
- package/dist/src/modules/harness.d.ts +25 -0
- package/dist/src/modules/harness.d.ts.map +1 -0
- package/dist/src/modules/importStorybook.d.ts +12 -0
- package/dist/src/modules/importStorybook.d.ts.map +1 -0
- package/dist/src/modules/lint.d.ts +3 -0
- package/dist/src/modules/lint.d.ts.map +1 -0
- package/dist/src/modules/pages.d.ts +10 -0
- package/dist/src/modules/pages.d.ts.map +1 -0
- package/dist/src/modules/parse/dts.d.ts +4 -0
- package/dist/src/modules/parse/dts.d.ts.map +1 -0
- package/dist/src/modules/parse/svelte.d.ts +3 -0
- package/dist/src/modules/parse/svelte.d.ts.map +1 -0
- package/dist/src/modules/parse/typeMembers.d.ts +64 -0
- package/dist/src/modules/parse/typeMembers.d.ts.map +1 -0
- package/dist/src/modules/parse/vue.d.ts +3 -0
- package/dist/src/modules/parse/vue.d.ts.map +1 -0
- package/dist/src/modules/resolve.d.ts +9 -0
- package/dist/src/modules/resolve.d.ts.map +1 -0
- package/dist/src/modules/schema.d.ts +53 -0
- package/dist/src/modules/schema.d.ts.map +1 -0
- package/dist/src/modules/stories.d.ts +4 -0
- package/dist/src/modules/stories.d.ts.map +1 -0
- package/dist/src/search/SearchModal.svelte.d.ts +1 -0
- package/dist/src/search/indexer.d.ts +5 -0
- package/dist/src/search/indexer.d.ts.map +1 -0
- package/dist/src/story/index.d.ts +17 -0
- package/dist/src/story/index.d.ts.map +1 -0
- package/dist/src/subscribe/subscribe.d.ts +5 -0
- package/dist/src/subscribe/subscribe.d.ts.map +1 -0
- package/dist/src/types.d.ts +531 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/story.es.js +10 -0
- package/dist/style.css +1 -0
- package/dist/tailwind.preset.d.ts +4 -0
- package/dist/tailwind.preset.d.ts.map +1 -0
- package/dist/tailwind.preset.es.js +67 -0
- package/dist/typeMembers-CNvE92EX.js +538 -0
- package/package.json +125 -0
- package/src/harness/svelte/ComponentHarness.svelte +12 -0
- package/src/harness/svelte/ComponentHarnessEffects.svelte +24 -0
- package/src/harness/svelte/ComponentHarnessOverlay.svelte +9 -0
- package/src/harness/svelte/ComponentStory.svelte +9 -0
- package/src/harness/svelte/DefaultHarness.svelte +15 -0
- package/src/harness/svelte/HarnessRoot.svelte +22 -0
- package/src/harness/svelte/context.svelte.ts +33 -0
- package/src/harness/svelte/index.ts +12 -0
- package/src/harness/vue/ComponentHarness.vue +16 -0
- package/src/harness/vue/ComponentHarnessEffects.vue +27 -0
- package/src/harness/vue/ComponentHarnessOverlay.vue +12 -0
- package/src/harness/vue/ComponentStory.vue +16 -0
- package/src/harness/vue/DefaultHarness.vue +14 -0
- package/src/harness/vue/context.ts +37 -0
- package/src/harness/vue/index.ts +11 -0
- package/src/mock/index.ts +88 -0
- package/src/styles/app.css +3 -0
- package/src/styles/preflight.css +540 -0
- package/src/styles/theme.css +81 -0
- package/src/styles/tokens.css +150 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Authoring doc pages
|
|
2
|
+
|
|
3
|
+
Rules for the default page type. Any markdown file without an explicit `type:` renders as a `doc`. Concept guides, references, tutorials, design docs, and one off retrospectives all use this type.
|
|
4
|
+
|
|
5
|
+
## Default behavior
|
|
6
|
+
|
|
7
|
+
1. No `type:` field. Setting `type: doc` is allowed and equivalent.
|
|
8
|
+
|
|
9
|
+
2. The route is derived from the file location under `contentDir`. Override with `path:` only when the URL and the file location must differ.
|
|
10
|
+
|
|
11
|
+
3. The page mounts inside the same shell as every other page: header, sidebar, content column, right rail TOC. The right rail lists H2 and H3 headings from the body.
|
|
12
|
+
|
|
13
|
+
## Required frontmatter
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
---
|
|
17
|
+
title: How sessions work
|
|
18
|
+
---
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
1. `title: string` is required. Use sentence case. This is the H1, the breadcrumb label, and the default sidebar label.
|
|
22
|
+
|
|
23
|
+
## Recommended frontmatter
|
|
24
|
+
|
|
25
|
+
1. `description` is a one sentence summary. Used as the meta description and the search excerpt. Add it for any page expected to land via search.
|
|
26
|
+
|
|
27
|
+
2. `tags` is a comma separated string or a YAML array. The search index boosts tag matches and shows them as pills under each result. Example: `tags: api, sessions, identity`. Search treats a trailing slash like `api/` as a folder scope filter.
|
|
28
|
+
|
|
29
|
+
3. `order` pins the page inside its parent sidebar group. Use sparingly. Default is alphabetical by title.
|
|
30
|
+
|
|
31
|
+
4. `icon` is a short emoji or icon name rendered next to the sidebar label.
|
|
32
|
+
|
|
33
|
+
5. `slug` shortens the sidebar label without renaming the file.
|
|
34
|
+
|
|
35
|
+
6. `noToc: true` hides the right rail. Use only on short pages where the TOC would feel empty.
|
|
36
|
+
|
|
37
|
+
7. `footer` renders a centered, muted line at the bottom of the page.
|
|
38
|
+
|
|
39
|
+
8. `lastUpdated: true` shows the last commit date for the file in the footer.
|
|
40
|
+
|
|
41
|
+
9. `meta` carries `description`, `canonical`, `robots`, `keywords`, `og`, `twitter`, `jsonLd` for SEO and social cards. Full reference in `frontmatter.md`.
|
|
42
|
+
|
|
43
|
+
## Body conventions
|
|
44
|
+
|
|
45
|
+
1. One H1 per page lives in `title`. Start the markdown body at H2.
|
|
46
|
+
|
|
47
|
+
2. Use H2 to separate top level sections. H3 for sub sections. Avoid H4 unless absolutely necessary.
|
|
48
|
+
|
|
49
|
+
3. Headings are sentence case.
|
|
50
|
+
|
|
51
|
+
4. Numbered lists at column zero in the form `1.`, `2.`, with a blank line between entries. Sub items use `1.1.`, `1.2.` at column zero. Never indent.
|
|
52
|
+
|
|
53
|
+
5. Fence every code block with its language. `bash`, `ts`, `python`, `json`, `yaml`, `http`. Aliases: `curl` renders as bash, `hurl` renders as http.
|
|
54
|
+
|
|
55
|
+
6. Use `:::code-group` when showing the same example in two or more languages.
|
|
56
|
+
|
|
57
|
+
7. Callouts are `:::tip`, `:::note`, `:::warning`, `:::info`, `:::check`. Three on a page is a lot.
|
|
58
|
+
|
|
59
|
+
8. Definition lists for reference grids of terms with one line descriptions. See [Definition lists](https://nimling.github.io/nimpress/definition-lists).
|
|
60
|
+
|
|
61
|
+
9. Mermaid blocks render `flowchart`, `stateDiagram-v2`, `sequenceDiagram`, `erDiagram` when a flow or state reads more cleanly visually.
|
|
62
|
+
|
|
63
|
+
10. ` ```dbml ` blocks render an interactive entity relationship diagram. Reach for it over a mermaid `erDiagram` whenever the subject is a real database schema. See `dbml-pages.md`.
|
|
64
|
+
|
|
65
|
+
## Linking
|
|
66
|
+
|
|
67
|
+
1. Relative links within the same section, absolute links across sections.
|
|
68
|
+
|
|
69
|
+
2. Use the page title as the link text. Avoid `click here`.
|
|
70
|
+
|
|
71
|
+
3. Anchor references to current code by file path and line number when describing implementation.
|
|
72
|
+
|
|
73
|
+
## Auth
|
|
74
|
+
|
|
75
|
+
1. `gate` marks the page guarded. Any string works; the build's guard function maps it to a guarded bundle and the runtime checks the viewer against it. Public pages omit it.
|
|
76
|
+
|
|
77
|
+
2. `visibility` controls where the page appears. `hidden` removes it from the sidebar, the search index, and the build. `dev-only` keeps it in `nimpress dev`, leaves it out of the built bundle, and marks its sidebar row with a red dot. Omit the field for a public page.
|
|
78
|
+
|
|
79
|
+
## Reading direction
|
|
80
|
+
|
|
81
|
+
1. The reader scrolls top to bottom. The URL hash updates as they pass headings so deep links survive sharing.
|
|
82
|
+
|
|
83
|
+
2. A back to top button slides in from the bottom left after 600px of scroll, sized to clear the sidebar column.
|
|
84
|
+
|
|
85
|
+
## Never
|
|
86
|
+
|
|
87
|
+
1. Never write an H1 inside the body. The title already renders as the H1.
|
|
88
|
+
|
|
89
|
+
2. Never set `path` to a value that conflicts with another page's `path`. The build raises an error.
|
|
90
|
+
|
|
91
|
+
3. Never invent fields the schema does not declare. Add them to the schema first, in the same change.
|
|
92
|
+
|
|
93
|
+
4. Never write Boolean values as quoted strings (`'true'`). Use unquoted booleans.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Authoring documentation
|
|
2
|
+
|
|
3
|
+
Rules for writing markdown pages, both inside this repo's `docs/` and inside consumer sites that use Nimpress.
|
|
4
|
+
|
|
5
|
+
## Voice
|
|
6
|
+
|
|
7
|
+
1. Short sentences. One idea per sentence.
|
|
8
|
+
|
|
9
|
+
2. Present tense. Active voice. Describe what is, not what will be.
|
|
10
|
+
|
|
11
|
+
3. No marketing language. No fluff.
|
|
12
|
+
|
|
13
|
+
4. Numbered lists at column zero in the form `1.`, `2.`, with a blank line between entries. Sub items use `1.1.`, `1.2.` at column zero. Never indent.
|
|
14
|
+
|
|
15
|
+
5. No bullets for ordered material. No a, b, c, no roman numerals.
|
|
16
|
+
|
|
17
|
+
6. No hyphens in text unless the word genuinely requires one, like `re-run` or `pre-commit`.
|
|
18
|
+
|
|
19
|
+
7. No em dashes, no en dashes, no parentheses. Restructure the sentence.
|
|
20
|
+
|
|
21
|
+
8. Never use the words `old`, `legacy`, `formerly`, `previously`, `used to be`, `replaces`, `renamed from`. Describe current state only.
|
|
22
|
+
|
|
23
|
+
## Headings
|
|
24
|
+
|
|
25
|
+
1. One H1 per page. The H1 is the rendered title, populated from frontmatter, so the markdown body starts at H2.
|
|
26
|
+
|
|
27
|
+
2. Use H2 to separate top level sections. H3 for sub sections. Avoid H4 unless absolutely necessary, the right rail TOC stops showing H4 in some themes.
|
|
28
|
+
|
|
29
|
+
3. Headings are sentence case. `## How it works`, not `## How It Works`.
|
|
30
|
+
|
|
31
|
+
## Links
|
|
32
|
+
|
|
33
|
+
1. Prefer relative links within the same section, absolute links across sections. See [Relative links](https://nimling.github.io/nimpress/relative-links).
|
|
34
|
+
|
|
35
|
+
2. Use the page title as the link text. Avoid `click here`.
|
|
36
|
+
|
|
37
|
+
## Code
|
|
38
|
+
|
|
39
|
+
1. Fence every code block with its language. `bash`, `ts`, `python`, `json`, `yaml`, `http`. Aliases: `curl` and `sh` render as bash, `hurl` renders as http.
|
|
40
|
+
|
|
41
|
+
2. Use `:::code-group` when showing the same example in two or more languages.
|
|
42
|
+
|
|
43
|
+
2.1. A ` ```dbml ` fence renders as an interactive diagram, not as code. Use it for database schemas and use `sql` for statements.
|
|
44
|
+
|
|
45
|
+
3. Keep code blocks short. Long examples belong in a runnable repo, linked from the docs.
|
|
46
|
+
|
|
47
|
+
## Tables
|
|
48
|
+
|
|
49
|
+
1. Tables for reference grids of fields, options, or commands.
|
|
50
|
+
|
|
51
|
+
2. First column is the identifier, last column is the description.
|
|
52
|
+
|
|
53
|
+
3. No nested markdown inside cells beyond inline code spans.
|
|
54
|
+
|
|
55
|
+
## Callouts
|
|
56
|
+
|
|
57
|
+
1. `:::tip` for opt in advice that improves outcomes.
|
|
58
|
+
|
|
59
|
+
2. `:::note` for context the reader benefits from but can skip.
|
|
60
|
+
|
|
61
|
+
3. `:::warning` for things that will go wrong if ignored.
|
|
62
|
+
|
|
63
|
+
4. `:::info` for neutral background.
|
|
64
|
+
|
|
65
|
+
5. `:::check` for verification steps.
|
|
66
|
+
|
|
67
|
+
Use sparingly. Three callouts on a page is already a lot.
|
|
68
|
+
|
|
69
|
+
## Definition lists
|
|
70
|
+
|
|
71
|
+
Use for reference grids of terms with one line descriptions:
|
|
72
|
+
|
|
73
|
+
```md
|
|
74
|
+
term_name
|
|
75
|
+
: One line description.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
See [Definition lists](https://nimling.github.io/nimpress/definition-lists).
|
|
79
|
+
|
|
80
|
+
## When to write what
|
|
81
|
+
|
|
82
|
+
1. Concept guide: one focused topic, 100 to 400 words, with examples. Lives under `docs/`.
|
|
83
|
+
|
|
84
|
+
2. Tutorial: a sequence of steps the reader follows in order. Numbered list at column zero, one section per phase.
|
|
85
|
+
|
|
86
|
+
3. Reference: dense table of fields, options, or APIs. Tables and definition lists carry most of the content.
|
|
87
|
+
|
|
88
|
+
4. Changelog entry: one markdown file per release, `type: changelog`, `data.version` set. See [Changelog renderer](https://nimling.github.io/nimpress/changelog-renderer).
|
|
89
|
+
|
|
90
|
+
5. Landing page: `type: hero` with a tagline and feature grid. See [Hero](https://nimling.github.io/nimpress/hero).
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Docs sync pipeline
|
|
2
|
+
|
|
3
|
+
Rules for wiring a repo's docs into the central docs site through the nimpress actions. The actions live in `nimling/nimpress/actions`, the docs site is the repo the pipeline is pointed at, and the shared GitHub App carries the cross repo trust. The reference is [Publishing a repo's docs to the central site](https://nimling.github.io/nimpress/actions).
|
|
4
|
+
|
|
5
|
+
## The shape
|
|
6
|
+
|
|
7
|
+
1. A source repo keeps its docs in an export folder at its root, `.nimpress` by default. The `export-dir` input on `docs-notify` names another. That folder is the content that syncs.
|
|
8
|
+
|
|
9
|
+
2. The source repo has a consumer workflow `.github/workflows/docs.yml` that triggers on a version tag, not on a branch push, and guards on whether the export folder changed since the previous version tag.
|
|
10
|
+
|
|
11
|
+
3. The docs site has the receiver `.github/workflows/docs-sync.yml` and optionally the mapping `nimpress.sources.json` at its root.
|
|
12
|
+
|
|
13
|
+
## Consumer workflow
|
|
14
|
+
|
|
15
|
+
1. Trigger is `on: push: tags: ['v*']` plus `workflow_dispatch`. Never trigger docs publish on a plain branch push.
|
|
16
|
+
|
|
17
|
+
2. A guard step compares the export folder between the current tag and the previous version tag with `git diff`, and the notify runs only when it changed. The folder name lives in one workflow level variable that both the guard and the `export-dir` input read. A `workflow_dispatch` always counts as changed.
|
|
18
|
+
|
|
19
|
+
3. Mint the token with `actions/create-github-app-token` using `app-id: secrets.APP_ID`, `private-key: secrets.APP_PRIVATE_KEY`, `owner: nimling`, and `repositories:` naming the docs site. Pass `steps.app.outputs.token` to `docs-notify@v2` with `docs-repo:` naming the same repo.
|
|
20
|
+
|
|
21
|
+
## Receiver workflow
|
|
22
|
+
|
|
23
|
+
The receiver is thin. The `docs-sync` action owns the mirror, the version bump, the commit and tag, and the pull request, with no other dependency.
|
|
24
|
+
|
|
25
|
+
1. Listens on `repository_dispatch` type `nimpress-docs-sync` and `workflow_dispatch`.
|
|
26
|
+
|
|
27
|
+
2. Mints an organization App token before checkout, then checks out the docs with that token and `fetch-depth: 0`, and checks out the source at the dispatched sha with the same token.
|
|
28
|
+
|
|
29
|
+
3. Runs `docs-sync@v2` with `token`, `docs-repo`, `docs-dir`, `source-repo`, `source-path`, `content-root`, and optionally `mapping` and `defaults`. Nothing else.
|
|
30
|
+
|
|
31
|
+
## Configuration
|
|
32
|
+
|
|
33
|
+
1. The action `defaults` input and each `nimpress.sources.json` source hold the same json shape: `target`, `mode`, `publish`, `branch`, `commit`, `pullRequest`, `version`. The result is `defaults` merged with the source, the source winning per field. Either alone can fully configure a source.
|
|
34
|
+
|
|
35
|
+
2. `commit.message`, `pullRequest.title`, `pullRequest.body`, and labels are Go templates with `.Repo`, `.Target`, `.Branch`, `.Version`, `.Added`, `.Modified`, `.Deleted`.
|
|
36
|
+
|
|
37
|
+
3. `publish` is `auto` or `pr`. `auto` commits to `branch`, default main, and on a push conflict falls back to a pull request. `pr` always opens one.
|
|
38
|
+
|
|
39
|
+
4. `version.files` are patch bumped in the sbump path form, and `version.tag` is pushed by the App token so the deploy fires on its own.
|
|
40
|
+
|
|
41
|
+
## Secrets and the App
|
|
42
|
+
|
|
43
|
+
1. The shared App is installed on each source repo and the docs repo with Contents read and write, Pull requests read and write, Metadata read.
|
|
44
|
+
|
|
45
|
+
2. Each source repo and the docs repo carry `APP_ID` and `APP_PRIVATE_KEY`. The private key is the `.pem` from the App settings Private keys section.
|
|
46
|
+
|
|
47
|
+
3. Never commit a private key. Keep `*.pem` in `.gitignore`.
|
|
48
|
+
|
|
49
|
+
## What is wrong if you see it
|
|
50
|
+
|
|
51
|
+
1. A consumer workflow triggered on a branch push rather than a version tag.
|
|
52
|
+
|
|
53
|
+
2. A receiver that commits, opens pull requests, or bumps versions in its own steps instead of letting the action do it.
|
|
54
|
+
|
|
55
|
+
3. A version tag pushed with the default token, which does not trigger the deploy. The App token must push it.
|
|
56
|
+
|
|
57
|
+
4. A hand committed `tools/<repo>` subtree. The action owns it.
|
|
58
|
+
|
|
59
|
+
5. A `.pem` tracked in git.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# File layout
|
|
2
|
+
|
|
3
|
+
Conventions for organizing markdown content inside a Nimpress site.
|
|
4
|
+
|
|
5
|
+
## Directory mirrors URL
|
|
6
|
+
|
|
7
|
+
By default, the directory layout under `contentDir` is the URL layout. `docs/guide/intro.md` lives at `/guide/intro`. `docs/guide/index.md` lives at `/guide`. `docs/index.md` lives at `/`.
|
|
8
|
+
|
|
9
|
+
Override with frontmatter `path` when the URL and the file location should differ.
|
|
10
|
+
|
|
11
|
+
## Index files
|
|
12
|
+
|
|
13
|
+
A directory that should have its own landing page contains an `index.md`. That file becomes the directory's route and the directory's sidebar group label.
|
|
14
|
+
|
|
15
|
+
A directory without an `index.md` shows as a synthetic group in the sidebar. The group label is a Title Case version of the directory name. The group has no link of its own, only its children.
|
|
16
|
+
|
|
17
|
+
## Naming
|
|
18
|
+
|
|
19
|
+
1. Files use lowercase kebab case. `getting-started.md`, not `Getting_Started.md`.
|
|
20
|
+
|
|
21
|
+
2. Directories use lowercase. `guide/`, not `Guide/`.
|
|
22
|
+
|
|
23
|
+
3. No spaces in file or directory names ever.
|
|
24
|
+
|
|
25
|
+
4. Avoid abbreviations unless the abbreviation is the canonical name in the domain.
|
|
26
|
+
|
|
27
|
+
## Grouping
|
|
28
|
+
|
|
29
|
+
1. One top level directory per top level section. Keep the count small, the sidebar gets crowded fast.
|
|
30
|
+
|
|
31
|
+
2. Co locate related pages. Tutorials for the OpenAPI renderer live near `docs/openapi.md`, not in a separate `tutorials/` tree.
|
|
32
|
+
|
|
33
|
+
3. Resist creating a directory for a single page. Promote that page up a level instead.
|
|
34
|
+
|
|
35
|
+
## Reorganizing
|
|
36
|
+
|
|
37
|
+
1. Renaming a file changes its URL. If the page might be linked externally, set frontmatter `path` to the old URL so the link still works.
|
|
38
|
+
|
|
39
|
+
2. Moving a file across directories is the same rule.
|
|
40
|
+
|
|
41
|
+
3. Deleting a file is a hard break. Decide whether to delete or to redirect via frontmatter `redirect`.
|
|
42
|
+
|
|
43
|
+
## Assets
|
|
44
|
+
|
|
45
|
+
1. Shared assets live in the `assetsDir` folder, `assets` by default, at the repo root. Reference them by an absolute path under `assetUrlBase`, `/assets` by default. ``. Downloadable files such as a pdf live here too and are served at the same base. The whole `assetsDir` folder is copied into the build output.
|
|
46
|
+
|
|
47
|
+
2. Images that belong to one page live next to that page's markdown file inside `contentDir`. Reference them with a path relative to the markdown file. ``. nimpress serves them in dev and emits every non markdown file under `contentDir` into the build output.
|
|
48
|
+
|
|
49
|
+
3. `assetsDir`, `assetUrlBase`, and `contentDir` are set in `nimpress.config`. A consumer that keeps a single public folder points `assetsDir` at it and sets `assetUrlBase` to `/`.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Frontmatter rules
|
|
2
|
+
|
|
3
|
+
Every markdown page declares YAML frontmatter at the top. Parsed with `gray-matter` and validated with `zod` in `src/plugin.ts`. Unknown fields warn but do not fail the build; declared fields come from the schema and the type definitions, extended there first, in the same change.
|
|
4
|
+
|
|
5
|
+
## Always
|
|
6
|
+
|
|
7
|
+
1. `title: string` is required. Use sentence case.
|
|
8
|
+
|
|
9
|
+
## Sometimes
|
|
10
|
+
|
|
11
|
+
1. `slug` shortens the sidebar label. Use when the title is descriptive but the sidebar needs to stay tight.
|
|
12
|
+
|
|
13
|
+
2. `path` overrides the route. Use when the file location and the URL should differ. Two pages sharing an effective path raise a build error.
|
|
14
|
+
|
|
15
|
+
3. `order: number` pins position inside the parent sidebar group. Use sparingly, the default alphabetical order is fine for most cases.
|
|
16
|
+
|
|
17
|
+
3.1. `sidebar` inserts the page under a named sidebar group without changing its URL: required `name` as the verbatim label, optional `icon` and `style` decorating the group row, optional `path` overriding the group route. On a folder `index.md` the block changes and styles the folder's own sidebar entry instead of nesting a group; this works on every page type. On the root `index.md` the block inserts the page into the sidebar as the entry for the directory named by `path`, making the root page a clickable top level item. A `.story.ts` file carries the same block on its definition, `sidebar: { name, icon, style }`, to decorate its own story row; see the component modules rule.
|
|
18
|
+
|
|
19
|
+
3.2. `sidebar.icon` accepts literal text or ascii art rendered verbatim in the mono font, inline `<svg>` markup rendered as markup, or a path ending in `.svg` resolved against the declaring file, or against `contentDir` when it starts with `/`, read at build time and inlined. An unreadable path warns and drops the icon. The sidebar renders icons only from `sidebar` blocks and story definitions.
|
|
20
|
+
|
|
21
|
+
4. `description` gets used as a meta description and a search excerpt. Add it for any page expected to land via search.
|
|
22
|
+
|
|
23
|
+
5. `visibility` controls where the page appears, one of `visible`, `hidden`, `dev-only`. `visible` is the default. `hidden` removes the page from sidebar, search, and the build, use it for drafts. `dev-only` keeps the page in `nimpress dev` but excludes it from the built bundle, use it for pages that must never ship.
|
|
24
|
+
|
|
25
|
+
6. `noToc: true` hides the right rail. Use on hero pages and short pages where the TOC would feel empty.
|
|
26
|
+
|
|
27
|
+
7. `footer: string` renders a centered, muted line at the bottom. Use for "Last reviewed", attribution, or a contact pointer.
|
|
28
|
+
|
|
29
|
+
8. `tags` is a comma separated string or a YAML array of short keywords. The search index boosts tag matches and shows matched tags as pills under each result. Query syntax: a token ending in `/` like `api/` scopes the result set to pages whose sidebar path starts with that segment, case insensitive. Combine: `api/ device` returns device results inside the api folder.
|
|
30
|
+
|
|
31
|
+
9. `gate: <string>` marks the page guarded. Any string works; the build's guard function maps gated pages into guarded bundles under `dist/_guarded/<bundle>/` and the runtime checks the viewer against the gate. Public pages omit it. Booleans stay unquoted (`true`, not `'true'`) everywhere in frontmatter.
|
|
32
|
+
|
|
33
|
+
## Choosing `type`
|
|
34
|
+
|
|
35
|
+
| You want | Set `type:` |
|
|
36
|
+
|----------|-------------|
|
|
37
|
+
| A normal documentation page | omit or `doc` |
|
|
38
|
+
| A reference page rendered from an OpenAPI 3.1 spec | `openapi` |
|
|
39
|
+
| A page combining several release notes into one collapsible list | `changelog` |
|
|
40
|
+
| A landing page with an oversized hero band on top | `hero` |
|
|
41
|
+
| A vertical roadmap timeline of milestones, epics, features, and bugs | `roadmap` |
|
|
42
|
+
| An interactive entity relationship diagram of a database | `dbml` |
|
|
43
|
+
| A live workshop page for one component in a library | `component` |
|
|
44
|
+
|
|
45
|
+
## Type specific fields
|
|
46
|
+
|
|
47
|
+
1. `type: openapi` requires `spec: ./path/to/spec.json` relative to the markdown file. `spec` carries the same duty on `type: dbml`, pointing at a `.dbml` file.
|
|
48
|
+
|
|
49
|
+
2. `type: changelog` requires `data.version: '1.2.3'`, `data.release_date` as an RFC 3339 date, `data.title` for the per release headline, and `data.description` for the per release summary. Top level `title` is the shared collection title and the grouping key, every entry file in the same folder uses the exact same string. The route comes from the folder, so entries carry no `path` field. Optional `data.issue: <relative path>` plus `data.status` link the entry to a roadmap issue. See [changelog-entries.md](./changelog-entries.md).
|
|
50
|
+
|
|
51
|
+
3. `type: hero` reads `data.eyebrow`, `data.logo`, `data.banner`, `data.tagline`, `data.lead`, `data.image`, `data.align`. Action buttons and feature grids compose as `:::actions` and `:::features` in the markdown body, `data` carries only the band fields. See [Hero](https://nimling.github.io/nimpress/hero) and [Markdown](https://nimling.github.io/nimpress/markdown).
|
|
52
|
+
|
|
53
|
+
4. `type: roadmap` reads `title`, optional `description`, optional `background`, and optional `data.changelog`, `data.issues` to scope which sibling folders feed the timeline. The markdown body renders as the page header above the timeline. Sibling files of `type: milestone | epic | feature | bug` become the timeline items.
|
|
54
|
+
|
|
55
|
+
5. `type: milestone | epic | feature | bug` (issue pages) require `title`, `description`, and `data.date` as an RFC 3339 string. Optional `data.parent` references another issue by relative filename. Each issue page renders at its own URL with a kind chip and date header. See [roadmap-entries.md](./roadmap-entries.md).
|
|
56
|
+
|
|
57
|
+
6. `type: dbml` requires `spec: ./path/to/schema.dbml` relative to the markdown file. The title, the description, and the markdown body render inside a hero band above the diagram, shaped by `data.eyebrow`, `data.lead`, `data.logo`, `data.banner`, and `data.align`, with `data.download`, `data.fullscreen`, and `data.actions` for its buttons and `data.height` for the diagram. See [dbml-pages.md](./dbml-pages.md).
|
|
58
|
+
|
|
59
|
+
7. `type: component` requires `data.system` naming a configured module system and `data.component` naming the component. Optional `data.package`, `data.file`, `data.version`, and `data.schema` as an inline schema layer merged over the schema file. One `type: component` page per folder; the sibling story files are its stories. See [component-modules.md](./component-modules.md).
|
|
60
|
+
|
|
61
|
+
## SEO and social cards
|
|
62
|
+
|
|
63
|
+
`meta` carries the per page metadata written to `<head>` at build time:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
meta:
|
|
67
|
+
description: One sentence for search.
|
|
68
|
+
canonical: https://developer.samna.io/path
|
|
69
|
+
robots: index,follow
|
|
70
|
+
keywords: [topic-a, topic-b]
|
|
71
|
+
og:
|
|
72
|
+
image: /og/page.png
|
|
73
|
+
type: article
|
|
74
|
+
twitter:
|
|
75
|
+
card: summary_large_image
|
|
76
|
+
site: '@samnaio'
|
|
77
|
+
jsonLd:
|
|
78
|
+
'@context': https://schema.org
|
|
79
|
+
'@type': TechArticle
|
|
80
|
+
headline: My page
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Structured payloads beyond `meta` live inside `data` as structured objects, never as loose top level fields. Defaults flow from `frontmatter.description` and the site level `site` config in `createNimpressApp`. Full reference in [SEO](https://nimling.github.io/nimpress/seo).
|
|
84
|
+
|
|
85
|
+
## Gating
|
|
86
|
+
|
|
87
|
+
1. `gate` is the single gating field. The value is an arbitrary string the site's guard function and access checker interpret; nimpress assigns it no meaning of its own.
|
|
88
|
+
|
|
89
|
+
2. At build, gated pages leave the public bundle and land in `dist/_guarded/<bundle>/`, where the bundle name comes from the `auth.guard` function in the nimpress config, or the gate value itself without one. `dist/guard.map.json` records what went where.
|
|
90
|
+
|
|
91
|
+
3. `visibility: hidden` removes a page from the build entirely, and `dev-only` from the built bundle, independent of `gate`. A viewer who satisfies the gate still cannot reach a page whose visibility excludes it.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Choosing a page type
|
|
2
|
+
|
|
3
|
+
Quick guide for picking the right `type` in frontmatter.
|
|
4
|
+
|
|
5
|
+
## `doc`
|
|
6
|
+
|
|
7
|
+
The default. Reach for it first. Anything that does not match another type is a `doc`.
|
|
8
|
+
|
|
9
|
+
## `openapi`
|
|
10
|
+
|
|
11
|
+
Use only when:
|
|
12
|
+
|
|
13
|
+
1. The page exists to document an HTTP API.
|
|
14
|
+
|
|
15
|
+
2. There is a maintained OpenAPI 3.1 spec next to the markdown file.
|
|
16
|
+
|
|
17
|
+
3. The reader expects per operation deep links such as `#operation/PostBookable`.
|
|
18
|
+
|
|
19
|
+
Do not duplicate the spec by writing prose for each endpoint. Edit the spec descriptions, the renderer pulls them in and runs them through the same markdown pipeline.
|
|
20
|
+
|
|
21
|
+
## `changelog`
|
|
22
|
+
|
|
23
|
+
Use when:
|
|
24
|
+
|
|
25
|
+
1. The page collects release notes that grow over time.
|
|
26
|
+
|
|
27
|
+
2. Each release should be authored as one markdown file, so reviewing a release is a single file PR.
|
|
28
|
+
|
|
29
|
+
3. Multiple files should share one URL and one rendered scroll.
|
|
30
|
+
|
|
31
|
+
Do not use `changelog` for migration guides or one off retrospectives. Those are `doc` pages.
|
|
32
|
+
|
|
33
|
+
## `hero`
|
|
34
|
+
|
|
35
|
+
Use sparingly for:
|
|
36
|
+
|
|
37
|
+
1. The site home page.
|
|
38
|
+
|
|
39
|
+
2. Top level section landing pages: `/solutions`, `/tools`, `/libraries`, `/api`.
|
|
40
|
+
|
|
41
|
+
3. New product or service introductions.
|
|
42
|
+
|
|
43
|
+
Do not use `hero` for ordinary documentation. The oversized typography is a beacon, not a default.
|
|
44
|
+
|
|
45
|
+
## `roadmap`
|
|
46
|
+
|
|
47
|
+
Use when:
|
|
48
|
+
|
|
49
|
+
1. The page surfaces planned and shipped work as a customer facing timeline.
|
|
50
|
+
|
|
51
|
+
2. The markdown file describes only the page header and background. Sibling files of `type: milestone | epic | feature | bug` carry the actual items.
|
|
52
|
+
|
|
53
|
+
3. Changelog entries can opt in with `data.issue: <relative path>` and `data.status` so shipped work updates the rocket and drops a marker on the spine.
|
|
54
|
+
|
|
55
|
+
Do not use `roadmap` for internal status notes or engineering tickets. The page is customer facing. See [roadmap-entries.md](./roadmap-entries.md).
|
|
56
|
+
|
|
57
|
+
## `milestone | epic | feature | bug`
|
|
58
|
+
|
|
59
|
+
Issue page types. Each file is one standalone page at its own URL, listed under a parent `type: roadmap` page in the sidebar.
|
|
60
|
+
|
|
61
|
+
1. Use when describing a roadmap item that customers should be able to deep link to.
|
|
62
|
+
|
|
63
|
+
2. Frontmatter: `title`, `description`, `data.date` are required. `data.parent` references another issue in the same roadmap.
|
|
64
|
+
|
|
65
|
+
3. The body is a regular doc page that renders with a kind chip and date header above the markdown.
|
|
66
|
+
|
|
67
|
+
## `dbml`
|
|
68
|
+
|
|
69
|
+
A full page entity relationship viewer. Use when:
|
|
70
|
+
|
|
71
|
+
1. The page exists to show the shape of a database.
|
|
72
|
+
|
|
73
|
+
2. The schema is maintained as a `.dbml` file next to the markdown file.
|
|
74
|
+
|
|
75
|
+
3. The reader should pan, zoom, and read column level detail rather than look at a static picture.
|
|
76
|
+
|
|
77
|
+
Frontmatter needs `spec` pointing at the `.dbml` file, and `data` shapes the hero band and its buttons. For a diagram inside a page that is mostly prose, use the inline ` ```dbml ` fence instead of this type. See [dbml-pages.md](./dbml-pages.md).
|
|
78
|
+
|
|
79
|
+
## `component`
|
|
80
|
+
|
|
81
|
+
A live component workshop page. Use when:
|
|
82
|
+
|
|
83
|
+
1. The page presents one component from a library configured as a module system.
|
|
84
|
+
|
|
85
|
+
2. Readers should render it live, drive its props through controls, and browse its stories.
|
|
86
|
+
|
|
87
|
+
Frontmatter needs `data.system` and `data.component`. One `type: component` page per folder; the sibling `.story.ts` files become the stories. See [component-modules.md](./component-modules.md).
|
|
88
|
+
|
|
89
|
+
## Decision tree
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
Is the page rendered from an OpenAPI spec?
|
|
93
|
+
├─ Yes → type: openapi
|
|
94
|
+
└─ No
|
|
95
|
+
├─ Is it a stack of versioned release notes?
|
|
96
|
+
│ └─ Yes → type: changelog
|
|
97
|
+
├─ Is it a customer facing roadmap header?
|
|
98
|
+
│ └─ Yes → type: roadmap
|
|
99
|
+
├─ Is it one item on a roadmap timeline?
|
|
100
|
+
│ └─ Yes → type: milestone | epic | feature | bug
|
|
101
|
+
├─ Is it a full page database diagram?
|
|
102
|
+
│ └─ Yes → type: dbml
|
|
103
|
+
├─ Is it a live component workshop page?
|
|
104
|
+
│ └─ Yes → type: component
|
|
105
|
+
├─ Is it a beacon style landing page?
|
|
106
|
+
│ └─ Yes → type: hero
|
|
107
|
+
└─ Otherwise → type: doc (omit the field)
|
|
108
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Paths and the cache root
|
|
2
|
+
|
|
3
|
+
Every folder nimpress writes is declared under the optional `paths` block in the config, each field carrying a default. This rule is the contract for where files may appear, for the tool and for anyone working in a consumer repo.
|
|
4
|
+
|
|
5
|
+
1. `paths.out`, default `dist`, is the build root. Build artifacts only.
|
|
6
|
+
|
|
7
|
+
2. `paths.cache`, default `node_modules/.nimpress`, is the single cache root for every operation, layered per feature beneath it.
|
|
8
|
+
|
|
9
|
+
2.1. `<cache>/site` holds the docs vite cache.
|
|
10
|
+
|
|
11
|
+
2.2. `<cache>/modules/<system>` holds the harness cache for each component system.
|
|
12
|
+
|
|
13
|
+
2.3. `<cache>/lint` holds the lint verification build and is removed when lint finishes.
|
|
14
|
+
|
|
15
|
+
2.4. `<cache>/verify` is the scratch layer for throwaway verification pages: harness html an agent or a human drops in to exercise a component through the running dev server, loaded same origin through the server's `@fs` urls. nimpress never reads or writes this layer. Whoever creates a file here deletes it when the verification is done.
|
|
16
|
+
|
|
17
|
+
3. `paths.export`, default `.nimpress`, is the handoff folder the export command fills for the docs-sync pipeline. An artifact, not a cache.
|
|
18
|
+
|
|
19
|
+
4. `paths.modules` and `paths.guarded`, defaults `_components` and `_guarded`, are both the folders under `out` and the served url segments.
|
|
20
|
+
|
|
21
|
+
## Never
|
|
22
|
+
|
|
23
|
+
1. Never write ephemeral files anywhere else: not the repo root, not a new dot folder under `node_modules`, not a temp dir the dev server cannot serve. The cache root is the one sanctioned location and `<cache>/verify` is the one sanctioned scratch layer.
|
|
24
|
+
|
|
25
|
+
2. Never write by hand into `<cache>/site`, `<cache>/modules/<system>`, or `<cache>/lint`. Those layers are owned by the commands that build them.
|
|
26
|
+
|
|
27
|
+
3. Never commit anything from the cache root. It lives under `node_modules` so git never sees it.
|