Skip to content

Add Vanilla JavaScript and React foundation templates - #4

Merged
jabahum merged 1 commit into
mainfrom
feat/web-foundation-templates
Oct 24, 2026
Merged

jabahum merged 1 commit into
mainfrom
feat/web-foundation-templates

Conversation

@jabahum

@jabahum jabahum commented Oct 24, 2026

Copy link
Copy Markdown
Collaborator

Foundry can now generate Vanilla JavaScript and React (JavaScript) applications with --template vanilla-js and --template react. Both foundations ship as directly embedded source files, appear in the interactive menu and registry, and print explicit npm setup instructions without installing dependencies during generation.

Each template includes Vite, native ES modules, a feature-first app/pages/features/shared structure, public static assets, an accessible example feature, shared styles/UI, public environment configuration, and an HTTP helper that handles unsuccessful/empty responses and cancellation. ESLint, Prettier, Vitest, Testing Library, exact dependency versions, and npm lockfiles provide repeatable checks and builds. React enables StrictMode and Hooks linting; Vanilla JS demonstrates listener teardown and isolated DOM state. Template READMEs document dependency direction and where new code belongs.

Generation now substitutes project settings in HTML, JavaScript, JSX, CSS, manifests, and lockfiles, with regression coverage for both web templates and project metadata. Node.js/npm are included in doctor. The project metadata package moves from internal/projectconfig to internal/config, with declarations, imports, and callers updated.

Validation:

  • make check smoke: formatting, all Foundry tests, vet, build, and existing generation/add smoke checks passed.
  • Fresh projects generated from the built Foundry binary: npm ci and npm run check passed for both templates, including formatting, lint, 6 behavior tests per template, and production builds.
  • ./scripts/build-release.sh ci: all six release targets passed.
  • Added CI that generates fresh bundled projects and runs npm checks for both templates on Node 22 and 24.
  • git diff --check passed.

@jabahum
jabahum merged commit 4f2b09d into main Oct 24, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant