Skip to content
Source
Sign inSign up
TanStack/cli

fix(create): exclude demo files and better-auth integrations when demo is disabled #431

ClosedWaryaWayne(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/431/headopened

Showing 3 changed files with 28 additions and 5 deletions.

x
0 of 3 viewed, 3 left
18 additions and 5 deletionspackages/create/src/create-app.tsModified
View file
@@ -17,14 +17,22 @@
​
import type { Environment, FileBundleHandler, Options } from './types.js'
​
-function isDemoRoutePath(path?: string) {
+function isDemoFilePath(path?: string) {
if (!path) return false
const normalized = path.replace(/\\/g, '/')
return (
normalized.includes('/routes/demo/') ||
normalized.includes('/routes/demo.') ||
normalized.includes('/routes/example/') ||
- normalized.includes('/routes/example.')
+ normalized.includes('/routes/example.') ||
+ normalized.includes('/lib/demo-') ||
+ normalized.includes('/lib/demo.') ||
+ normalized.includes('/hooks/demo-') ||
+ normalized.includes('/hooks/demo.') ||
+ normalized.includes('/data/demo-') ||
+ normalized.includes('/data/demo.') ||
+ normalized.includes('/components/demo-') ||
+ normalized.includes('/components/demo.')
​