You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build-and-deploy.md
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This project uses two runtime modes:
4
4
5
-
- Local development mode: dynamic CDN resolution from `src/cdn.js` with esm.sh as default.
5
+
- Local development mode: dynamic CDN resolution from `src/modules/cdn.js` with esm.sh as default.
6
6
- Production mode: CDN-first build artifacts in `dist`, with `build:esm` as the current preferred deploy build.
7
7
8
8
## Local Development
@@ -45,8 +45,8 @@ npm run build:importmap-mode
45
45
| Mode | Resolver | Import map step | JSPM index needed | Typical use |
46
46
| --- | --- | --- | --- | --- |
47
47
|`importMap`| Import map in `dist/index.html`| Yes | Yes | Default production mode |
48
-
|`esm`|`src/cdn.js` (`esm.sh` primary) | No | No | Stable fallback mode |
49
-
|`jspmGa`|`src/cdn.js` (`ga.jspm.io` primary) | No | No | Direct ga.jspm.io testing |
48
+
|`esm`|`src/modules/cdn.js` (`esm.sh` primary) | No | No | Stable fallback mode |
49
+
|`jspmGa`|`src/modules/cdn.js` (`ga.jspm.io` primary) | No | No | Direct ga.jspm.io testing |
50
50
<!-- prettier-ignore-end -->
51
51
52
52
Mode notes:
@@ -72,7 +72,7 @@ This runs two steps:
72
72
-`sass=1.93.2`
73
73
-`less=4.4.2`
74
74
- Traces generated `dist/prod-imports.js`
75
-
- Import specifiers come from `importMap` entries in `src/cdn.js` (`cdnImportSpecs`)
75
+
- Import specifiers come from `importMap` entries in `src/modules/cdn.js` (`cdnImportSpecs`)
76
76
77
77
Preview the built site locally:
78
78
@@ -99,18 +99,20 @@ Related docs:
99
99
100
100
-`docs/code-mirror.md` for CodeMirror CDN integration rules, fallback behavior, and validation checklist.
101
101
102
+
-`src/modules/cdn.js` is the source of truth for CDN-managed runtime libraries (including fallback candidates). Add/update CDN specs there instead of hardcoding module URLs inside feature modules.
103
+
102
104
- In production, the current preferred deploy mode is ESM resolution (`window.__KNIGHTED_PRIMARY_CDN__ = "esm"`).
103
105
- In `importMap` mode, runtime resolution is import-map first; if a specifier is missing from the generated map, runtime falls back through the CDN
104
-
provider chain configured in `src/cdn.js`.
105
-
- In `esm` and `jspmGa` modes, runtime resolution is handled entirely by the CDN provider chain configured in `src/cdn.js` without an import map.
106
+
provider chain configured in `src/modules/cdn.js`.
107
+
- In `esm` and `jspmGa` modes, runtime resolution is handled entirely by the CDN provider chain configured in `src/modules/cdn.js` without an import map.
106
108
107
109
### Sass Loading Gotchas
108
110
109
111
- Symptom: switching to Sass mode shows `Unable to load Sass compiler for browser usage: Dynamic require of "url" is not supported`.
110
112
- Cause: some `esm.sh` Sass outputs currently include runtime paths that are not browser-safe for this app.
111
-
- Current mitigation: `src/cdn.js` keeps `esm.sh` first, then falls back to `unpkg` for Sass via `sass@1.93.2/sass.default.js?module`.
113
+
- Current mitigation: `src/modules/cdn.js` keeps `esm.sh` first, then falls back to `unpkg` for Sass via `sass@1.93.2/sass.default.js?module`.
112
114
- Important context: this can appear even if the Sass URL has not changed in this repo, because CDN-transformed module output can change upstream.
113
115
- If this regresses again:
114
-
- Verify Sass import candidates in `src/cdn.js`.
116
+
- Verify Sass import candidates in `src/modules/cdn.js`.
115
117
- Reproduce directly in browser devtools with `await import('<candidate-url>')`.
116
118
- Keep at least one known browser-safe fallback provider in the Sass candidate list.
Copy file name to clipboardExpand all lines: docs/next-steps.md
+20-3Lines changed: 20 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,18 @@
2
2
3
3
Focused follow-up work for `@knighted/develop`.
4
4
5
-
1.**In-browser component/style linting**
6
-
- Explore running lint checks for component and style sources directly in the playground.
7
-
- Prefer CDN-delivered tooling where possible and preserve graceful fallback behavior when unavailable.
5
+
1.**In-browser lint rules review and expansion**
6
+
- Review the currently active Biome lint configuration in `src/modules/lint-diagnostics.js`, including rule groups, severities, and any custom suppression behavior.
7
+
- Produce a recommended rule profile for component and style linting that balances signal quality with playground ergonomics.
- correctness and suspicious patterns in component code,
10
+
- accessibility and style consistency in JSX output,
11
+
- CSS quality checks for style sources currently supported by Biome.
12
+
- Revisit existing exceptions (for example unused App/View/render bindings) and document clear criteria for when suppression is acceptable.
13
+
- Add/update regression coverage for the chosen rule profile in Playwright so diagnostics button/drawer behavior remains stable as rules evolve.
14
+
- Document the finalized lint rule strategy in project docs so contributors can reason about why each rule is enabled, disabled, or downgraded.
15
+
- Suggested implementation prompt:
16
+
- "Audit the current Biome lint rules used by `@knighted/develop`, propose and apply a refined rule profile for component/styles linting, and add/update Playwright coverage to keep diagnostics UX stable under the new rules. Preserve intentional suppressions only when justified and document the reasoning. Validate with `npm run lint`, `npm run build:esm`, and targeted lint diagnostics Playwright tests."
8
17
9
18
2.**In-browser component type checking**
10
19
- Add editor-linked diagnostics navigation so each issue can jump to the exact line/column in the component source.
@@ -39,3 +48,11 @@ Focused follow-up work for `@knighted/develop`.
39
48
- DOM mode still avoids React type graph hydration.
40
49
- Suggested implementation prompt:
41
50
- "Refactor `src/modules/type-diagnostics.js` to make TypeScript preprocessor parsing (`preProcessFile`) the source of truth for declaration graph discovery in the lazy React type loader. Keep current CDN fallback and lazy hydration semantics. Ensure references from comments are ignored, `*.d.ts`/relative path handling is correct, and candidate fetch ordering minimizes noisy failed requests. Add regression coverage for `global.d.ts` and commented `./user-context` examples. Validate with `npm run lint`, `npm run build:esm`, and targeted React/typecheck Playwright runs."
51
+
52
+
6.**Deterministic E2E lane in CI**
53
+
- Add an integration-style E2E path that uses locally served/pinned copies of CDN runtime dependencies for test execution, while keeping production runtime behavior unchanged.
54
+
- Keep the current true CDN-backed E2E path as a separate smoke check, but make the deterministic lane the required gate for pull requests.
55
+
- Run this deterministic E2E suite on **every pull request** in CI.
56
+
- Ensure the deterministic lane still exercises the same user-facing flows (render, typecheck, lint, diagnostics drawer/button states), only swapping the source of runtime artifacts.
57
+
- Suggested implementation prompt:
58
+
- "Add a deterministic E2E execution mode for `@knighted/develop` that serves pinned runtime artifacts locally (instead of live CDN fetches) and wire it into CI as a required check on every PR. Keep a separate lightweight CDN-smoke E2E check for real-network coverage. Validate with `npm run lint`, deterministic Playwright PR checks, and one CDN-smoke Playwright run."
0 commit comments