@brust/create-app 0.0.0-stage → 2.0.0-alpha.10
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/README.md +19 -2
- package/bin/create-app.ts +4 -0
- package/package.json +31 -4
- package/src/args.ts +64 -0
- package/src/cli.ts +69 -0
- package/src/copy.ts +44 -0
- package/src/dep.ts +61 -0
- package/src/tailwind.ts +10 -0
- package/src/templates.ts +64 -0
- package/templates/blank/README.md.tmpl +43 -0
- package/templates/blank/_gitignore +4 -0
- package/templates/blank/actions.ts +13 -0
- package/templates/blank/app.css +32 -0
- package/templates/blank/brust.toml +6 -0
- package/templates/blank/components/Counter.tsx +15 -0
- package/templates/blank/components/Layout.tsx +22 -0
- package/templates/blank/package.json.tmpl +30 -0
- package/templates/blank/pages/HomePage.tsx +35 -0
- package/templates/blank/public/favicon.svg +1 -0
- package/templates/blank/routes.tsx +5 -0
- package/templates/blank/tsconfig.json +37 -0
- package/templates/blank/wrangler.jsonc.tmpl +9 -0
- package/templates/pokedex/README.md.tmpl +59 -0
- package/templates/pokedex/_gitignore +5 -0
- package/templates/pokedex/actions.ts +37 -0
- package/templates/pokedex/brust.toml +28 -0
- package/templates/pokedex/components/AddToTeamButton.tsx +37 -0
- package/templates/pokedex/components/AppLayout.tsx +32 -0
- package/templates/pokedex/components/Breadcrumb.tsx +4 -0
- package/templates/pokedex/components/DexCard.tsx +11 -0
- package/templates/pokedex/components/DexFilter.tsx +26 -0
- package/templates/pokedex/components/HeroSearch.tsx +14 -0
- package/templates/pokedex/components/NavLink.tsx +6 -0
- package/templates/pokedex/components/TeamBuilder.tsx +32 -0
- package/templates/pokedex/components/ThemeToggle.tsx +16 -0
- package/templates/pokedex/components/TypeBadge.tsx +5 -0
- package/templates/pokedex/components/UnifiedIsland.tsx +28 -0
- package/templates/pokedex/components/UnifiedNative.tsx +20 -0
- package/templates/pokedex/components/UnifiedStoreNode.tsx +14 -0
- package/templates/pokedex/data/pokedex.json +8767 -0
- package/templates/pokedex/lib/api.ts +5 -0
- package/templates/pokedex/lib/cloudflare.d.ts +24 -0
- package/templates/pokedex/lib/filter.ts +6 -0
- package/templates/pokedex/lib/format.ts +4 -0
- package/templates/pokedex/lib/loaders.ts +192 -0
- package/templates/pokedex/lib/pokeapi.ts +43 -0
- package/templates/pokedex/lib/team-client.ts +26 -0
- package/templates/pokedex/lib/team-db.d1.ts +47 -0
- package/templates/pokedex/lib/team-db.sqlite.ts +49 -0
- package/templates/pokedex/lib/team-db.ts +13 -0
- package/templates/pokedex/lib/team.ts +2 -0
- package/templates/pokedex/lib/types.ts +126 -0
- package/templates/pokedex/migrations/0001_team.sql +2 -0
- package/templates/pokedex/package.json.tmpl +30 -0
- package/templates/pokedex/pages/BrowsePage.tsx +15 -0
- package/templates/pokedex/pages/DetailPage.tsx +233 -0
- package/templates/pokedex/pages/HomePage.tsx +129 -0
- package/templates/pokedex/pages/NotFoundPage.tsx +7 -0
- package/templates/pokedex/pages/TypeChart.tsx +72 -0
- package/templates/pokedex/pages/UnifiedPage.tsx +24 -0
- package/templates/pokedex/public/app.css +3 -0
- package/templates/pokedex/public/favicon.svg +1 -0
- package/templates/pokedex/routes.tsx +27 -0
- package/templates/pokedex/scripts/snapshot.ts +53 -0
- package/templates/pokedex/stores/team.ts +6 -0
- package/templates/pokedex/stores/unified.ts +4 -0
- package/templates/pokedex/styles/app.css +14 -0
- package/templates/pokedex/tsconfig.json +37 -0
- package/templates/pokedex/wrangler.jsonc +9 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@source "../**/*.{tsx,ts}";
|
|
3
|
+
@custom-variant dark (&:where([data-mode="dark"], [data-mode="dark"] *));
|
|
4
|
+
|
|
5
|
+
@theme {
|
|
6
|
+
--color-brand-50: oklch(0.97 0.02 264);
|
|
7
|
+
--color-brand-500: oklch(0.55 0.20 264);
|
|
8
|
+
--color-brand-600: oklch(0.49 0.20 264);
|
|
9
|
+
--color-brand-700: oklch(0.43 0.19 264);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
button {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
// Environment setup & latest features
|
|
4
|
+
"lib": [
|
|
5
|
+
"ESNext",
|
|
6
|
+
"DOM",
|
|
7
|
+
"DOM.Iterable"
|
|
8
|
+
],
|
|
9
|
+
"target": "ESNext",
|
|
10
|
+
"module": "Preserve",
|
|
11
|
+
"moduleDetection": "force",
|
|
12
|
+
"jsx": "react-jsx",
|
|
13
|
+
"allowJs": true,
|
|
14
|
+
"types": [
|
|
15
|
+
"bun"
|
|
16
|
+
],
|
|
17
|
+
// Bundler mode
|
|
18
|
+
"moduleResolution": "bundler",
|
|
19
|
+
"allowImportingTsExtensions": true,
|
|
20
|
+
"verbatimModuleSyntax": true,
|
|
21
|
+
"noEmit": true,
|
|
22
|
+
// Best practices
|
|
23
|
+
"strict": true,
|
|
24
|
+
"skipLibCheck": true,
|
|
25
|
+
"noFallthroughCasesInSwitch": true,
|
|
26
|
+
"noUncheckedIndexedAccess": true,
|
|
27
|
+
"noImplicitOverride": true,
|
|
28
|
+
// Some stricter flags (disabled by default)
|
|
29
|
+
"noUnusedLocals": false,
|
|
30
|
+
"noUnusedParameters": false,
|
|
31
|
+
"noPropertyAccessFromIndexSignature": false
|
|
32
|
+
},
|
|
33
|
+
"exclude": [
|
|
34
|
+
"dist",
|
|
35
|
+
"node_modules"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Bindings for `brust build --target cloudflare` (merged into dist/cf/wrangler.jsonc).
|
|
2
|
+
// brust owns main, assets and compatibility_date. Add the database_id from `wrangler d1 create pokedex-team` before deploy.
|
|
3
|
+
{
|
|
4
|
+
// To enable the shared cache tier (brust.toml [cache]), add these beside d1_databases:
|
|
5
|
+
// "kv_namespaces": [{ "binding": "BRUST_CACHE", "id": "<wrangler kv namespace create brust-cache>" }],
|
|
6
|
+
// "durable_objects": { "bindings": [{ "name": "BRUST_CACHE_DO", "class_name": "BrustCacheDO" }] },
|
|
7
|
+
// "migrations": [{ "tag": "brust-cache-v1", "new_sqlite_classes": ["BrustCacheDO"] }],
|
|
8
|
+
"d1_databases": [{ "binding": "TEAM_DB", "database_name": "pokedex-team", "migrations_dir": "migrations" }]
|
|
9
|
+
}
|