Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7780380
Updated STAN
jasongalvin Aug 29, 2025
06c2075
feat: convert to React 18 component template
jasongalvin Aug 29, 2025
fede91a
fix: clean lint and TS for React component template
jasongalvin Aug 29, 2025
8a6424f
chore: switch to TS ESLint flat config; fix lint/TS friction
jasongalvin Aug 29, 2025
1144b8f
Fix vitest typescript error
jasongalvin Aug 29, 2025
24e0dbe
docs: rewrite README for React component template
jasongalvin Aug 29, 2025
c8dee9f
Update docs
jasongalvin Aug 30, 2025
af01fc1
Node 20 compatibility fix and update Rollup config
jasongalvin Aug 30, 2025
a631efa
Revert the Rollup configuration file back to TS
jasongalvin Aug 31, 2025
6f8d5b5
Update docs
jasongalvin Aug 31, 2025
f6677cb
tests: add entry tests; edge cases; tweak cov
jasongalvin Aug 31, 2025
f9f1dfb
Fix failing test
jasongalvin Aug 31, 2025
bfb97b4
Update github urls in package.json
jasongalvin Aug 31, 2025
ce46b97
Update package-lock.json
jasongalvin Aug 31, 2025
6376dfc
docs: add “How to use this template” section
jasongalvin Aug 31, 2025
ce300b0
Improved cross-platform config
karmaniverous Aug 31, 2025
366bf65
fix: set tsconfigRootDir to fix Windows lint
karmaniverous Aug 31, 2025
08afae7
chore: lint playground and drop hook proposal
karmaniverous Aug 31, 2025
a7d5cba
lintfix
karmaniverous Aug 31, 2025
10ad821
chore: dedupe ESLint config; share Prettier/sort
karmaniverous Aug 31, 2025
abd3826
Added license & updated README
karmaniverous Aug 31, 2025
c4e02f4
lintfix
karmaniverous Aug 31, 2025
6142d7e
docs(readme): add STAN + “In The Box” section
karmaniverous Aug 31, 2025
956bf53
updated docs
karmaniverous Aug 31, 2025
bd31c56
Update README.md
karmaniverous Aug 31, 2025
ab11e12
Update README.md
karmaniverous Aug 31, 2025
8c3e405
updated docs
karmaniverous Aug 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .lefthook/pre-commit/branch-naming-policy
100644 → 100755
Empty file.
Empty file modified .lefthook/prepare-commit-msg/add-issue
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .stan/system/.docs.meta.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "0.4.0"
"version": "0.5.6"
}
50 changes: 50 additions & 0 deletions .stan/system/stan.project.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# stan.project.md — Project-specific requirements

When updated: 2025-08-29T00:00:00Z

Repository goal

- Provide a ready-to-use template for building and publishing React 18
component libraries using TypeScript.

Baseline decisions

- React
- Target React 18.
- Use the modern “react-jsx” runtime.
- Build outputs
- ESM-only. No CJS or IIFE bundles.
- ship types (.d.ts).
- Dependencies
- react and react-dom are peerDependencies (>=18).
- Also present as devDependencies for local development and playground.
- Mark package as "sideEffects": false (no global CSS side-effects).
- Linting
- TS-only rules; no react-specific eslint plugins for now.
- Ignore playground/\*\* from lint to avoid dev-only noise.
- Flat config in eslint.config.ts (TypeScript), executed via
`node --loader tsx` in npm scripts.
- Tests linted with Vitest recommended rules (non type-checked).
- Testing
- Vitest with happy-dom environment (project default).
- @testing-library/react and @testing-library/jest-dom for component tests.
- jest-dom is registered via vitest.setup.ts.
- Dev preview
- Vite playground under /playground for interactive browser viewing.
- Playground is excluded from npm package (files: ["dist"]) and from
typecheck/lint.
- Source layout
- Components under src/components.
- Public entry at src/index.ts re-exports components.
- Removed legacy pieces
- CLI example and related build logic removed.
- No IIFE browser bundle.
- Docs
- Keep TypeDoc for API docs; entry remains src/index.ts.

Operational notes

- Rollup marks react and react/jsx-runtime as externals.
- Keep release and docs scripts; they may be adjusted later as needed.
- Consider adding Storybook or Ladle later if richer docs are required.

1 change: 0 additions & 1 deletion .stan/system/stan.project.template.md

This file was deleted.

35 changes: 35 additions & 0 deletions .stan/system/stan.todo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
When updated: 2025-08-31T00:00:00Z

Next up

- Run: npm install to ensure new devDependencies (react, react-dom,
@types/react, @types/react-dom, vite, @vitejs/plugin-react,
@testing-library/\*, tsx) are installed before running test/docs/typecheck.
- Optionally add story tooling (Storybook or Ladle) if docs scale up.
- Consider pruning unused devDependencies flagged by knip.

Completed (recent)

- Added tests for library entry re-exports and HelloWorld edge cases.
- Tuned Vitest coverage to exclude docs/, dist/, and playground/ by default.
- Updated README test section with entry re-export example and coverage notes.
- Updated README to reflect React component template usage and features.
- Replaced eslint.config.js with eslint.config.ts (flat config), updated
npm scripts to run ESLint via node --loader tsx.
- Scoped linting to avoid type-aware parse errors; ignore playground;
tests use Vitest recommended rules (non type-checked).
- Excluded tests and playground from ts typecheck; removed jest-dom types from tsconfig to prevent build/docs errors if not installed.
- Excluded .rollup.cache from Vitest to avoid stale compiled tests.
- Excluded playground from lint/typecheck to reduce false positives.
- Added vitest.setup.ts and configured jest-dom globally.
- Fixed unsafe return by typing HelloWorld return to JSX.Element.
- Sorted imports and simplified tests.
- Updated stan.config.yml to use standard build script.
- Converted template to React 18 with react-jsx runtime.
- Switched to ESM-only build; removed CJS/IIFE and CLI scaffold.
- Added Vite playground under /playground for browser preview.
- Added HelloWorld component + tests (Testing Library).
- Marked react/react-dom as peerDependencies; set sideEffects: false.
- Updated rollup config to externalize react & react/jsx-runtime.
- Kept TypeDoc; preserved Vitest + happy-dom environment.
- Updated package/repository metadata placeholders.
308 changes: 14 additions & 294 deletions CHANGELOG.md

Large diffs are not rendered by default.

384 changes: 214 additions & 170 deletions README.md

Large diffs are not rendered by default.

50 changes: 46 additions & 4 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,22 @@
--dark-hl-2: #CE9178;
--light-hl-3: #008000;
--dark-hl-3: #6A9955;
--light-hl-4: #0000FF;
--dark-hl-4: #569CD6;
--light-hl-5: #AF00DB;
--dark-hl-5: #C586C0;
--light-hl-4: #AF00DB;
--dark-hl-4: #C586C0;
--light-hl-5: #0000FF;
--dark-hl-5: #569CD6;
--light-hl-6: #267F99;
--dark-hl-6: #4EC9B0;
--light-hl-7: #001080;
--dark-hl-7: #9CDCFE;
--light-hl-8: #800000;
--dark-hl-8: #808080;
--light-hl-9: #800000;
--dark-hl-9: #569CD6;
--light-hl-10: #E50000;
--dark-hl-10: #9CDCFE;
--light-hl-11: #0451A5;
--dark-hl-11: #9CDCFE;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
Expand All @@ -22,6 +34,12 @@
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--hl-10: var(--light-hl-10);
--hl-11: var(--light-hl-11);
--code-background: var(--light-code-background);
} }

Expand All @@ -32,6 +50,12 @@
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--hl-10: var(--dark-hl-10);
--hl-11: var(--dark-hl-11);
--code-background: var(--dark-code-background);
} }

Expand All @@ -42,6 +66,12 @@
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--hl-10: var(--light-hl-10);
--hl-11: var(--light-hl-11);
--code-background: var(--light-code-background);
}

Expand All @@ -52,6 +82,12 @@
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--hl-10: var(--dark-hl-10);
--hl-11: var(--dark-hl-11);
--code-background: var(--dark-code-background);
}

Expand All @@ -61,4 +97,10 @@
.hl-3 { color: var(--hl-3); }
.hl-4 { color: var(--hl-4); }
.hl-5 { color: var(--hl-5); }
.hl-6 { color: var(--hl-6); }
.hl-7 { color: var(--hl-7); }
.hl-8 { color: var(--hl-8); }
.hl-9 { color: var(--hl-9); }
.hl-10 { color: var(--hl-10); }
.hl-11 { color: var(--hl-11); }
pre, code { background: var(--code-background); }
2 changes: 1 addition & 1 deletion docs/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading