@lucaismyname/create-l1-stack 0.0.25 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +3 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -423,7 +423,7 @@ async function applyLayout(targetDir, language, layoutKey, containerPresetKey) {
|
|
|
423
423
|
|
|
424
424
|
await fse.remove(topNavPath)
|
|
425
425
|
|
|
426
|
-
const app = `import { Route, Routes } from 'react-router-dom'\nimport SidebarLayout from './components/SidebarLayout'\nimport { ErrorBoundary } from './components/ErrorBoundary'\nimport Home from './pages/Home'\nimport
|
|
426
|
+
const app = `import { Route, Routes } from 'react-router-dom'\nimport SidebarLayout from './components/SidebarLayout'\nimport { ErrorBoundary } from './components/ErrorBoundary'\nimport Home from './pages/Home'\nimport QuickStart from './pages/QuickStart'\nimport NotFound from './pages/NotFound'\n\nfunction App() {\n return (\n <SidebarLayout>\n <ErrorBoundary>\n <Routes>\n <Route path=\"/\" element={<Home />} />\n <Route path=\"/quick-start\" element={<QuickStart />} />\n <Route path=\"*\" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>\n </SidebarLayout>\n )\n}\n\nexport default App\n`
|
|
427
427
|
await fs.writeFile(appPath, app, 'utf8')
|
|
428
428
|
return
|
|
429
429
|
}
|
|
@@ -432,7 +432,7 @@ async function applyLayout(targetDir, language, layoutKey, containerPresetKey) {
|
|
|
432
432
|
await fse.remove(topNavPath)
|
|
433
433
|
await fse.remove(sidebarPath)
|
|
434
434
|
|
|
435
|
-
const app = `import { Route, Routes } from 'react-router-dom'\nimport { ErrorBoundary } from './components/ErrorBoundary'\nimport Home from './pages/Home'\nimport
|
|
435
|
+
const app = `import { Route, Routes } from 'react-router-dom'\nimport { ErrorBoundary } from './components/ErrorBoundary'\nimport Home from './pages/Home'\nimport QuickStart from './pages/QuickStart'\nimport NotFound from './pages/NotFound'\n\nfunction App() {\n return (\n <div className=\"min-h-dvh\">\n <main className=\"mx-auto ${containerMaxW} px-4 py-10\">\n <ErrorBoundary>\n <Routes>\n <Route path=\"/\" element={<Home />} />\n <Route path=\"/quick-start\" element={<QuickStart />} />\n <Route path=\"*\" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>\n </main>\n </div>\n )\n}\n\nexport default App\n`
|
|
436
436
|
await fs.writeFile(appPath, app, 'utf8')
|
|
437
437
|
return
|
|
438
438
|
}
|
|
@@ -460,7 +460,7 @@ async function applyLayout(targetDir, language, layoutKey, containerPresetKey) {
|
|
|
460
460
|
// }
|
|
461
461
|
next = next.replace(
|
|
462
462
|
/<Routes>[\s\S]*?<\/Routes>/m,
|
|
463
|
-
`<ErrorBoundary>\n <Routes>\n <Route path="/" element={<Home />} />\n <Route path="/
|
|
463
|
+
`<ErrorBoundary>\n <Routes>\n <Route path="/" element={<Home />} />\n <Route path="/quick-start" element={<QuickStart />} />\n <Route path="*" element={<NotFound />} />\n </Routes>\n </ErrorBoundary>`
|
|
464
464
|
)
|
|
465
465
|
if (next !== src) await fs.writeFile(appPath, next, 'utf8')
|
|
466
466
|
} catch {
|