Skip to content

Commit

Permalink
Reimplement with new solid-start version
Browse files Browse the repository at this point in the history
Had to throw out the auth library and make some other changes
  • Loading branch information
jakst committed Dec 19, 2024
1 parent 5d3c671 commit ec23dfa
Show file tree
Hide file tree
Showing 28 changed files with 4,279 additions and 4,400 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"packageManager": "pnpm@9.15.0",
"engines": {
"node": "18.x"
"node": "22.x"
},
"scripts": {
"app": "pnpm --filter app",
Expand All @@ -27,8 +27,10 @@
"typescript": "^5.7.2"
},
"pnpm": {
"overrides": {
"vite": "6.0.4"
},
"patchedDependencies": {
"solid-start@0.2.26": "patches/solid-start@0.2.26.patch",
"@microlabs/otel-cf-workers@1.0.0-rc.14": "patches/@microlabs__otel-cf-workers@1.0.0-rc.14.patch"
}
}
Expand Down
9 changes: 6 additions & 3 deletions packages/app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ dist
.output
.vercel
.netlify
netlify
.vinxi
app.config.timestamp_*.js

# Environment
.env
.env*.local

# dependencies
/node_modules
Expand All @@ -21,5 +26,3 @@ gitignore
# System Files
.DS_Store
Thumbs.db

.env
38 changes: 38 additions & 0 deletions packages/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { defineConfig } from "@solidjs/start/config"
import Icons from "unplugin-icons/vite"
import { VitePWA } from "vite-plugin-pwa"

export default defineConfig({
vite: {
plugins: [
Icons({ compiler: "solid", autoInstall: true }),
VitePWA({
registerType: "autoUpdate",
workbox: {
globPatterns: ["**/*.{js,css,woff2,png,svg}"],
navigateFallback: null,
runtimeCaching: [
{
urlPattern: ({ url }) => url.pathname === "/",
handler: "StaleWhileRevalidate",
},
],
},
manifest: {
name: "Shopping Bird",
short_name: "Shopping Bird",
description: "Your shopping list",
start_url: "/",
theme_color: "#0369a1",
background_color: "#fff",
icons: [
{ src: "/icon-x192.png", sizes: "192x192", type: "image/png" },
{ src: "/icon-x512.png", sizes: "512x512", type: "image/png" },
{ src: "/maskable-icon-x192.png", sizes: "192x192", type: "image/png", purpose: "maskable" },
{ src: "/maskable-icon-x512.png", sizes: "512x512", type: "image/png", purpose: "maskable" },
],
},
}),
],
},
})
69 changes: 32 additions & 37 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,42 @@
"name": "app",
"version": "1.0.0",
"private": true,
"type": "module",
"scripts": {
"dev": "dotenv solid-start dev -- --port 3400",
"build": "solid-start build",
"start": "solid-start start --port 3400"
"dev": "vinxi dev --port 3400",
"build": "vinxi build",
"start": "dotenvx run -- vinxi start --port 3400",
"version": "vinxi version"
},
"type": "module",
"devDependencies": {
"@iconify-json/bi": "^1.1.17",
"@iconify-json/ci": "^1.1.9",
"@iconify-json/radix-icons": "^1.1.10",
"autoprefixer": "^10.4.14",
"dotenv-cli": "^7.2.1",
"postcss": "^8.4.25",
"solid-devtools": "^0.27.3",
"tailwindcss": "^3.3.2",
"typescript": "^5.7.2",
"unplugin-icons": "^0.16.5",
"vite": "^4.4.3",
"vite-plugin-pwa": "^0.16.4"
"@dotenvx/dotenvx": "^1.31.0",
"@iconify-json/bi": "1.2.2",
"@iconify-json/ci": "1.2.2",
"@iconify-json/radix-icons": "1.2.2",
"@types/node": "22.10.2",
"autoprefixer": "10.4.20",
"postcss": "8.4.49",
"tailwindcss": "3.4.17",
"typescript": "5.7.2",
"unplugin-icons": "0.22.0",
"vite-plugin-pwa": "0.21.1"
},
"dependencies": {
"@auth/core": "^0.9.0",
"@auth/solid-start": "^0.1.1",
"@radix-ui/colors": "^1.0.0",
"@solid-primitives/connectivity": "^0.3.15",
"@solid-primitives/page-visibility": "^2.0.12",
"@solidjs/meta": "^0.28.5",
"@solidjs/router": "^0.8.2",
"@thisbeyond/solid-dnd": "^0.7.4",
"@types/node": "^20.4.2",
"dotenv": "^16.3.1",
"lib": "workspace:^",
"motion": "^10.16.2",
"solid-js": "^1.9.3",
"solid-motionone": "^1.0.2",
"solid-start": "^0.2.26",
"solid-start-node": "^0.2.26",
"solid-start-vercel": "^0.2.26",
"solid-transition-group": "^0.2.2",
"undici": "^5.22.1",
"workbox-window": "^7.0.0",
"zod": "^3.21.4"
"@radix-ui/colors": "3.0.0",
"@solid-mediakit/auth": "3.1.2",
"@solid-primitives/connectivity": "0.3.20",
"@solid-primitives/page-visibility": "2.0.17",
"@solidjs/meta": "0.29.4",
"@solidjs/router": "0.15.2",
"@solidjs/start": "1.0.10",
"@thisbeyond/solid-dnd": "0.7.5",
"lib": "workspace:*",
"motion": "11.15.0",
"solid-js": "1.9.3",
"solid-motionone": "1.0.2",
"solid-transition-group": "0.2.3",
"vinxi": "0.5.1",
"workbox-window": "7.3.0",
"zod": "3.24.1"
}
}
3 changes: 2 additions & 1 deletion packages/app/src/root.css → packages/app/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
}

html,
body {
body,
#app {
height: 100%;
}

Expand Down
19 changes: 19 additions & 0 deletions packages/app/src/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { MetaProvider } from "@solidjs/meta"
import { Router } from "@solidjs/router"
import { FileRoutes } from "@solidjs/start/router"
import { Suspense } from "solid-js"
import "./app.css"

export default function App() {
return (
<Router
root={(props) => (
<MetaProvider>
<Suspense>{props.children}</Suspense>
</MetaProvider>
)}
>
<FileRoutes />
</Router>
)
}
2 changes: 1 addition & 1 deletion packages/app/src/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type JSX } from "solid-js"
import type { JSX } from "solid-js"

export function Button(props: { onClick?: () => void; disabled?: boolean; children: JSX.Element }) {
return (
Expand Down
Loading

0 comments on commit ec23dfa

Please sign in to comment.