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
{{ message }}
Repository navigation
Commit e3de582
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(create): strip all demo/example files when users opt out (#434)
* fix(create): exclude demo files in lib, hooks, data, and components when demo is disabled
Previously only demo route files were filtered out when the user chose
no demo files. Demo files in components/, lib/, hooks/, and data/
directories would still be created. Rename isDemoRoutePath to
isDemoFilePath to reflect the broader scope and extend pattern matching
to cover all non-route demo file paths.
* fix(create): exclude better-auth demo integration files when demo is disabled
The better-auth header-user components reference the /demo/better-auth route,
which doesn't exist when users opt out of demo files. Convert these to EJS
templates with conditional rendering so they return null instead of linking
to a non-existent route. Also extend isDemoFilePath filtering to cover
add-on integration files (previously only routes, lib, hooks, data, and
components were filtered in a037c4d).
* fix(create): generate minimal scaffolding when declining demo/example pages
* fix(create): move HeadContent to head block in Solid root template
* fix(create): broaden demo file matching to catch all demo-prefixed files
The directory-specific filter missed demo support files in /store/, /public/,
at src root (demo.index.css), and example assets (example-guitar-*.jpg).
Replace directory-specific checks with a filename-prefix match so any file
named demo.*, demo-*, example.*, or example-* gets stripped when users
opt out of demo pages, regardless of which directory it lives in.
Add a regression test that exercises demo files across lib, hooks, data,
components, store, public, and routes.
---------
Co-authored-by: Abdullahi Mohamed <[email protected]>
Co-authored-by: wyMinLwin <[email protected]>
Copy file name to clipboardExpand all lines: packages/create/src/frameworks/react/add-ons/better-auth/assets/src/integrations/better-auth/header-user.tsx.ejs
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
import { authClient } from "#/lib/auth-client";
2
+
<%_ if (routes.some(r=>r.url==='/demo/better-auth')) { _%>
0 commit comments