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: CHANGELOG.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9
9
10
10
### Added
11
11
12
+
-**Prerequisites check** - CLI now verifies Git, Node.js (>= 18), and npm are available before scaffolding begins. Shows platform-specific install instructions (macOS: brew/Xcode CLT, Windows: winget, Linux: apt/dnf/pacman) if tools are missing
13
+
-**GitHub account prompt** - Asks beginners if they have a GitHub account; if not, displays a guided signup panel with link and steps, then waits for confirmation before continuing. Automatically skipped in CI/non-TTY environments
14
+
-**`--skip-checks` flag** - New CLI option to bypass prerequisite environment checks for experienced users
15
+
-**Prerequisites test suite** - 18 new tests covering platform detection, version checks, install instruction generators, and GitHub signup info
16
+
-**Post-scaffold validation** - CLI now runs `lint:all` after dependency installation to verify template integrity before the developer starts coding
17
+
-**Template health report** - `TEMPLATE-HEALTH.md` auto-generated dashboard showing versions, component counts, lint script coverage, and status across all 3 templates. Run `node scripts/generate-template-health.js` to regenerate
18
+
-**Template validation CI** - New `template-validation.yml` workflow that scaffolds, installs, lints, and builds all 3 templates on every PR touching `templates/` or `src/`
19
+
-**Trimble Identity auth rules** - Cursor rules and commands for adding TID authentication to all 3 templates: React (`@trimble-oss/trimble-id-react`), SolidJS (embedded wrapper around `TIDClient`), and Angular (`@trimble-oss/trimble-id` core SDK with signals-based `AuthService`, functional guard, and HTTP interceptor)
12
20
-**SolidJS Template** - New SolidJS + Vite + Modus 2.0 Components template
13
21
- SolidJS 1.9.5 with `@solidjs/router` for client-side routing
14
22
- Direct Modus web component integration (no wrapper library needed)
@@ -25,11 +33,37 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-**Pre-commit hooks now block on failure** - All 3 templates: added `|| exit 1` to every check so failed lints actually prevent commits (previously hooks always exited 0)
39
+
-**Pre-commit hooks run all checks** - React/SolidJS now run 8 checks (added `lint:opacity` and `lint:icon-names`), Angular runs 7
40
+
-**`lint:all` runs all checks** - New `run-all-checks.js` script replaces `&&` chaining so all checks run even if some fail, with a summary table at the end
41
+
-**SolidJS `<span>` in ModusTooltip** - Changed to `<div>` to pass `lint:semantic` (verified tooltip still works via Playwright)
42
+
-**React `<span>` in ModusTooltip** - Same fix as SolidJS
43
+
-**Inline styles false positive** - Fixed exclusion path from `src/pages/ColorPalettePage.tsx` to `src/dev-pages/**` in all templates
44
+
-**SolidJS scripts said "Vite + React"** - All 8 scripts updated to say "Vite + SolidJS"
45
+
-**SolidJS semantic HTML script suggested `className=`** - Fixed to suggest `class=` (SolidJS syntax)
46
+
-**Angular semantic HTML script said "Vite + React"** - Fixed to say "Angular", suggestions use `class=`
47
+
-**SolidJS GitHub instructions used React patterns** - Rewrote all 5 `.github/instructions/` files with SolidJS patterns (`createSignal`, `onMount`, `class=`, `Component` type, `@solidjs/router`)
48
+
-**SolidJS CI missing from template verification** - Added `templates/solidjs/package.json` check to `ci.yml`
49
+
28
50
### Changed
29
51
52
+
- CLI scaffold flow now starts with environment prerequisites before framework selection
30
53
- CLI now supports three frameworks: React, Angular, and SolidJS
31
54
- Framework validation updated to accept `solidjs` as a valid option
32
55
- Updated CLI security notice and help text to list all three templates
56
+
- CLI architecture now includes step 7 (post-scaffold validation) between dependency install and success message
57
+
58
+
### Cursor Rules Updated (SolidJS)
59
+
60
+
-`modus-checkbox-value-inversion-solidjs-short.mdc` - Wrapper prop is `value` not `checked`; use `onValueChange`
61
+
-`modus-checkbox-value-inversion-solidjs.mdc` - Added "Use the Wrapper" section with correct API
62
+
-`modus-navbar-side-navigation-solidjs-short.mdc` - Added navbar slots and SideNavigation flat-only limitation
63
+
-`modus-navbar-side-navigation-solidjs.mdc` - Added custom sidebar guidance for hierarchical navigation
2. GitHub account prompt (interactive only, skipped in CI/non-TTY)
47
+
3. Framework selection (interactive or CLI arg)
48
+
4. Installation location (current folder or new directory)
49
+
5. Project name validation
50
+
6. Dry-run preview (if enabled)
51
+
7. Template copying
52
+
8. package.json name update
53
+
9. Dependency installation (optional)
54
+
10. Success message
52
55
53
56
**src/frameworks.js**: Loads `templates/config.json` and returns enabled frameworks. Filters out any with `disabled: true`. Provides `getFrameworkById()` lookup.
**src/utils/git.js**: `copyTemplate()` copies from bundled `templates/` directory to target (local file copy, no git operations despite the filename). Skips `node_modules`, `dist`, `.angular`, `.git`, `coverage`, `.nyc_output` directories and lock files during copy. Renames `dot-npmrc` → `.npmrc` and `gitignore` → `.gitignore` (npm strips these during publish). `getDetailedErrorMessage()` transforms errors (EACCES, ENOSPC, etc.) into user-friendly messages.
58
61
62
+
**src/utils/prerequisites.js**: `runPrerequisites()` checks the development environment before scaffolding: verifies Git is installed (with platform-specific install guide if missing for macOS/Windows/Linux), validates Node.js >= 18 (with nvm/fnm/nodejs.org upgrade instructions), confirms npm is available, and prompts about GitHub account (shows signup guide with boxen if needed). Skipped in CI/non-TTY mode for the GitHub prompt. All checks use `execa` with hardcoded arguments (no user input in commands). Exports individual check functions for testing.
63
+
59
64
**src/utils/install.js**: Auto-detects package manager from lock files, runs install using execa.
60
65
61
66
**src/utils/colors.js**: Trimble Brand Blue (#0063a3) with true color/256-color fallback via picocolors. All color functions used throughout the CLI.
@@ -68,6 +73,8 @@ Complete working projects in `templates/react/`, `templates/angular/`, and `temp
All three templates include Trimble Identity (TID) authentication Cursor commands (`.cursor/commands/trimble-id.md`) and rules (`.cursor/rules/add-trimble-identity-auth.mdc`). React uses `@trimble-oss/trimble-id-react`, SolidJS wraps `TIDClient` in a SolidJS context, Angular uses `@trimble-oss/trimble-id` core SDK with signals-based `AuthService`, functional guard, and HTTP interceptor.
77
+
71
78
#### SolidJS Template
72
79
73
80
SolidJS 1.9 + Vite + TypeScript + Tailwind CSS 3 + @solidjs/router. Uses `@trimble-oss/moduswebcomponents` (vanilla web components, no React wrapper).
@@ -99,6 +106,7 @@ Vitest tests in `tests/`:
99
106
- frameworks.test.js
100
107
- utils/file.test.js
101
108
- utils/git.test.js
109
+
- utils/prerequisites.test.js
102
110
103
111
30s timeout for integration tests. Coverage excludes src/cli.js.
0 commit comments