From d3318b2972f5f1323e0a945e49bc1f2bb51d426a Mon Sep 17 00:00:00 2001 From: Nikhil Saraf Date: Thu, 3 Feb 2022 23:26:11 -0800 Subject: [PATCH] create-solid uses examples repo to give a list of templates to clone from (#76) * start fixing templates and making it possible to disable ssr * setup various examples * fix create-solid to use examples * add client templates * hackernews add -ts for typescript * remove logging * remove cloudflare stuff * remove trash * add docs * remove client adpater Co-authored-by: Nikhil Saraf --- docs/package.json | 2 +- docs/src/root.tsx | 5 +- examples/{basic-ts => app-ts}/README.md | 0 examples/{basic-ts => app-ts}/package.json | 2 +- .../{basic-ts => app-ts}/public/favicon.ico | Bin .../src/components/Counter.css | 0 .../src/components/Counter.tsx | 0 .../{basic-ts => app-ts}/src/entry-client.tsx | 0 .../{basic-ts => app-ts}/src/entry-server.tsx | 0 .../app-ts/src/root.tsx | 4 +- .../{basic-ts => app-ts}/src/routes/index.css | 0 .../{basic-ts => app-ts}/src/routes/index.tsx | 0 examples/{basic-ts => app-ts}/tsconfig.json | 0 examples/{basic-ts => app-ts}/vite.config.ts | 0 .../app-ts => examples/app}/README.md | 0 .../templates => examples}/app/jsconfig.json | 0 .../templates => examples}/app/package.json | 2 +- .../{hackernews => app}/public/favicon.ico | Bin .../app}/src/components/Counter.css | 0 .../app/src/components/Counter.jsx | 0 .../app/src/entry-client.jsx | 0 .../app/src/entry-server.jsx | 0 .../templates => examples}/app/src/root.jsx | 4 +- .../app}/src/routes/index.css | 0 .../app/src/routes/index.jsx | 0 .../templates => examples}/app/vite.config.js | 0 .../{hackernews => hackernews-ts}/.gitignore | 0 .../{hackernews => hackernews-ts}/README.md | 0 .../package.json | 3 +- .../hackernews-ts}/public/favicon.ico | Bin .../public/img/android-chrome-192x192.png | Bin .../public/img/android-chrome-512x512.png | Bin .../public/img/apple-touch-icon.png | Bin .../public/img/favicon-16x16.png | Bin .../public/img/favicon-32x32.png | Bin .../public/img/mstile-150x150.png | Bin .../public/manifest.webmanifest | 0 .../public/robots.txt | 0 .../public/sw.js | 0 .../src/components/comment.tsx | 0 .../src/components/nav.tsx | 0 .../src/components/story.tsx | 0 .../src/entry-client.tsx | 0 .../src/entry-server.tsx | 0 .../src/lib/api.ts | 0 .../src/root.css | 0 .../src/root.tsx | 4 +- .../src/routes/[...stories].data.ts | 0 .../src/routes/[...stories].tsx | 0 .../src/routes/stories/[id].data.ts | 0 .../src/routes/stories/[id].tsx | 0 .../src/routes/users/[id].data.ts | 0 .../src/routes/users/[id].tsx | 0 .../tsconfig.json | 0 .../vite.config.ts | 0 examples/hackernews/wrangler.toml | 12 - .../with-mdx-client-ts}/README.md | 0 examples/with-mdx-client-ts/index.html | 11 + .../with-mdx-client-ts}/package.json | 12 +- .../with-mdx-client-ts}/public/favicon.ico | Bin .../src/components/Counter.css | 0 .../src/components/Counter.tsx | 0 .../with-mdx-client-ts/src/entry-client.tsx | 4 + examples/with-mdx-client-ts/src/root.tsx | 6 + .../with-mdx-client-ts/src/routes/about.mdx | 1 + .../with-mdx-client-ts}/src/routes/index.css | 0 .../with-mdx-client-ts/src/routes/index.tsx | 20 + .../with-mdx-client-ts}/tsconfig.json | 0 examples/with-mdx-client-ts/vite.config.ts | 18 + examples/with-mdx-client/README.md | 32 ++ examples/with-mdx-client/index.html | 11 + examples/with-mdx-client/jsconfig.json | 9 + examples/with-mdx-client/package.json | 24 + examples/with-mdx-client/public/favicon.ico | Bin 0 -> 664 bytes .../src/components/Counter.css | 20 + .../src/components/Counter.jsx | 11 + examples/with-mdx-client/src/entry-client.jsx | 4 + examples/with-mdx-client/src/root.jsx | 6 + examples/with-mdx-client/src/routes/about.mdx | 1 + examples/with-mdx-client/src/routes/index.css | 36 ++ .../with-mdx-client/src/routes/index.jsx | 0 examples/with-mdx-client/vite.config.js | 18 + examples/with-mdx-ts/package.json | 4 +- examples/with-mdx-ts/src/root.tsx | 4 +- examples/with-mdx-ts/vite.config.ts | 2 +- examples/with-mdx/README.md | 32 ++ examples/with-mdx/jsconfig.json | 9 + examples/with-mdx/package.json | 24 + examples/with-mdx/public/favicon.ico | Bin 0 -> 664 bytes examples/with-mdx/src/components/Counter.css | 20 + examples/with-mdx/src/components/Counter.jsx | 11 + .../with-mdx/src/entry-client.jsx | 0 .../with-mdx/src/entry-server.jsx | 14 +- .../src/root.tsx => with-mdx/src/root.jsx} | 4 +- examples/with-mdx/src/routes/docs.mdx | 5 + examples/with-mdx/src/routes/index.css | 36 ++ examples/with-mdx/src/routes/index.mdx | 9 + examples/with-mdx/vite.config.js | 18 + packages/create-solid/README.md | 34 +- packages/create-solid/cli/github.js | 44 ++ packages/create-solid/cli/index.js | 146 ++++- packages/create-solid/package.json | 7 +- .../create-solid/templates/app-ts/gitignore | 23 - .../templates/app-ts/vite.config.ts | 6 - packages/create-solid/templates/app/gitignore | 23 - .../components/{Outlet.tsx => Routes.tsx} | 0 packages/start/components/index.tsx | 2 +- packages/start/package.json | 3 + packages/start/plugin.js | 188 +++++-- pnpm-lock.yaml | 531 ++++++++---------- 110 files changed, 1009 insertions(+), 472 deletions(-) rename examples/{basic-ts => app-ts}/README.md (100%) rename examples/{basic-ts => app-ts}/package.json (94%) rename examples/{basic-ts => app-ts}/public/favicon.ico (100%) rename examples/{basic-ts => app-ts}/src/components/Counter.css (100%) rename examples/{basic-ts => app-ts}/src/components/Counter.tsx (100%) rename examples/{basic-ts => app-ts}/src/entry-client.tsx (100%) rename examples/{basic-ts => app-ts}/src/entry-server.tsx (100%) rename {packages/create-solid/templates => examples}/app-ts/src/root.tsx (80%) rename examples/{basic-ts => app-ts}/src/routes/index.css (100%) rename examples/{basic-ts => app-ts}/src/routes/index.tsx (100%) rename examples/{basic-ts => app-ts}/tsconfig.json (100%) rename examples/{basic-ts => app-ts}/vite.config.ts (100%) rename {packages/create-solid/templates/app-ts => examples/app}/README.md (100%) rename {packages/create-solid/templates => examples}/app/jsconfig.json (100%) rename {packages/create-solid/templates => examples}/app/package.json (93%) rename examples/{hackernews => app}/public/favicon.ico (100%) rename {packages/create-solid/templates/app-ts => examples/app}/src/components/Counter.css (100%) rename {packages/create-solid/templates => examples}/app/src/components/Counter.jsx (100%) rename {packages/create-solid/templates => examples}/app/src/entry-client.jsx (100%) rename {packages/create-solid/templates => examples}/app/src/entry-server.jsx (100%) rename {packages/create-solid/templates => examples}/app/src/root.jsx (80%) rename {packages/create-solid/templates/app-ts => examples/app}/src/routes/index.css (100%) rename {packages/create-solid/templates => examples}/app/src/routes/index.jsx (100%) rename {packages/create-solid/templates => examples}/app/vite.config.js (100%) rename examples/{hackernews => hackernews-ts}/.gitignore (100%) rename examples/{hackernews => hackernews-ts}/README.md (100%) rename examples/{hackernews => hackernews-ts}/package.json (89%) rename {packages/create-solid/templates/app-ts => examples/hackernews-ts}/public/favicon.ico (100%) rename examples/{hackernews => hackernews-ts}/public/img/android-chrome-192x192.png (100%) rename examples/{hackernews => hackernews-ts}/public/img/android-chrome-512x512.png (100%) rename examples/{hackernews => hackernews-ts}/public/img/apple-touch-icon.png (100%) rename examples/{hackernews => hackernews-ts}/public/img/favicon-16x16.png (100%) rename examples/{hackernews => hackernews-ts}/public/img/favicon-32x32.png (100%) rename examples/{hackernews => hackernews-ts}/public/img/mstile-150x150.png (100%) rename examples/{hackernews => hackernews-ts}/public/manifest.webmanifest (100%) rename examples/{hackernews => hackernews-ts}/public/robots.txt (100%) rename examples/{hackernews => hackernews-ts}/public/sw.js (100%) rename examples/{hackernews => hackernews-ts}/src/components/comment.tsx (100%) rename examples/{hackernews => hackernews-ts}/src/components/nav.tsx (100%) rename examples/{hackernews => hackernews-ts}/src/components/story.tsx (100%) rename examples/{hackernews => hackernews-ts}/src/entry-client.tsx (100%) rename examples/{hackernews => hackernews-ts}/src/entry-server.tsx (100%) rename examples/{hackernews => hackernews-ts}/src/lib/api.ts (100%) rename examples/{hackernews => hackernews-ts}/src/root.css (100%) rename examples/{hackernews => hackernews-ts}/src/root.tsx (91%) rename examples/{hackernews => hackernews-ts}/src/routes/[...stories].data.ts (100%) rename examples/{hackernews => hackernews-ts}/src/routes/[...stories].tsx (100%) rename examples/{hackernews => hackernews-ts}/src/routes/stories/[id].data.ts (100%) rename examples/{hackernews => hackernews-ts}/src/routes/stories/[id].tsx (100%) rename examples/{hackernews => hackernews-ts}/src/routes/users/[id].data.ts (100%) rename examples/{hackernews => hackernews-ts}/src/routes/users/[id].tsx (100%) rename examples/{hackernews => hackernews-ts}/tsconfig.json (100%) rename examples/{hackernews => hackernews-ts}/vite.config.ts (100%) delete mode 100644 examples/hackernews/wrangler.toml rename {packages/create-solid/templates/app => examples/with-mdx-client-ts}/README.md (100%) create mode 100644 examples/with-mdx-client-ts/index.html rename {packages/create-solid/templates/app-ts => examples/with-mdx-client-ts}/package.json (56%) rename {packages/create-solid/templates/app => examples/with-mdx-client-ts}/public/favicon.ico (100%) rename {packages/create-solid/templates/app => examples/with-mdx-client-ts}/src/components/Counter.css (100%) rename {packages/create-solid/templates/app-ts => examples/with-mdx-client-ts}/src/components/Counter.tsx (100%) create mode 100644 examples/with-mdx-client-ts/src/entry-client.tsx create mode 100644 examples/with-mdx-client-ts/src/root.tsx create mode 100644 examples/with-mdx-client-ts/src/routes/about.mdx rename {packages/create-solid/templates/app => examples/with-mdx-client-ts}/src/routes/index.css (100%) create mode 100644 examples/with-mdx-client-ts/src/routes/index.tsx rename {packages/create-solid/templates/app-ts => examples/with-mdx-client-ts}/tsconfig.json (100%) create mode 100644 examples/with-mdx-client-ts/vite.config.ts create mode 100644 examples/with-mdx-client/README.md create mode 100644 examples/with-mdx-client/index.html create mode 100644 examples/with-mdx-client/jsconfig.json create mode 100644 examples/with-mdx-client/package.json create mode 100644 examples/with-mdx-client/public/favicon.ico create mode 100644 examples/with-mdx-client/src/components/Counter.css create mode 100644 examples/with-mdx-client/src/components/Counter.jsx create mode 100644 examples/with-mdx-client/src/entry-client.jsx create mode 100644 examples/with-mdx-client/src/root.jsx create mode 100644 examples/with-mdx-client/src/routes/about.mdx create mode 100644 examples/with-mdx-client/src/routes/index.css rename packages/create-solid/templates/app-ts/src/routes/index.tsx => examples/with-mdx-client/src/routes/index.jsx (100%) create mode 100644 examples/with-mdx-client/vite.config.js create mode 100644 examples/with-mdx/README.md create mode 100644 examples/with-mdx/jsconfig.json create mode 100644 examples/with-mdx/package.json create mode 100644 examples/with-mdx/public/favicon.ico create mode 100644 examples/with-mdx/src/components/Counter.css create mode 100644 examples/with-mdx/src/components/Counter.jsx rename packages/create-solid/templates/app-ts/src/entry-client.tsx => examples/with-mdx/src/entry-client.jsx (100%) rename packages/create-solid/templates/app-ts/src/entry-server.tsx => examples/with-mdx/src/entry-server.jsx (63%) rename examples/{basic-ts/src/root.tsx => with-mdx/src/root.jsx} (80%) create mode 100644 examples/with-mdx/src/routes/docs.mdx create mode 100644 examples/with-mdx/src/routes/index.css create mode 100644 examples/with-mdx/src/routes/index.mdx create mode 100644 examples/with-mdx/vite.config.js create mode 100644 packages/create-solid/cli/github.js delete mode 100644 packages/create-solid/templates/app-ts/gitignore delete mode 100644 packages/create-solid/templates/app-ts/vite.config.ts delete mode 100644 packages/create-solid/templates/app/gitignore rename packages/start/components/{Outlet.tsx => Routes.tsx} (100%) diff --git a/docs/package.json b/docs/package.json index 8649f4490..4f41fc05b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,7 +11,7 @@ "author": "", "license": "ISC", "devDependencies": { - "@mdx-js/rollup": "^2.0.0-rc.1", + "@mdx-js/rollup": "^2.0.0", "rehype-highlight": "^5.0.2", "remark-code-extra": "^1.0.1", "remark-gfm": "^3.0.1", diff --git a/docs/src/root.tsx b/docs/src/root.tsx index 8a030e4d6..321a4c1c3 100644 --- a/docs/src/root.tsx +++ b/docs/src/root.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { Links, Meta, Outlet, Scripts } from "solid-start/components"; +import { Links, Meta, Routes, Scripts } from "solid-start/components"; import "./code.css"; import "virtual:windi.css"; @@ -23,9 +23,8 @@ export default function Root() { ...md }} > -
-

WIP

+

WIP

These docs are a major work in progress. They are incomplete and have inaccurate information. That is why we need you! Feel free to ask questions in the discord chat diff --git a/examples/basic-ts/README.md b/examples/app-ts/README.md similarity index 100% rename from examples/basic-ts/README.md rename to examples/app-ts/README.md diff --git a/examples/basic-ts/package.json b/examples/app-ts/package.json similarity index 94% rename from examples/basic-ts/package.json rename to examples/app-ts/package.json index b6dd84ad7..d7c904bbc 100644 --- a/examples/basic-ts/package.json +++ b/examples/app-ts/package.json @@ -1,5 +1,5 @@ { - "name": "example-basic-ts", + "name": "example-app-ts", "scripts": { "dev": "solid-start dev", "build": "solid-start build", diff --git a/examples/basic-ts/public/favicon.ico b/examples/app-ts/public/favicon.ico similarity index 100% rename from examples/basic-ts/public/favicon.ico rename to examples/app-ts/public/favicon.ico diff --git a/examples/basic-ts/src/components/Counter.css b/examples/app-ts/src/components/Counter.css similarity index 100% rename from examples/basic-ts/src/components/Counter.css rename to examples/app-ts/src/components/Counter.css diff --git a/examples/basic-ts/src/components/Counter.tsx b/examples/app-ts/src/components/Counter.tsx similarity index 100% rename from examples/basic-ts/src/components/Counter.tsx rename to examples/app-ts/src/components/Counter.tsx diff --git a/examples/basic-ts/src/entry-client.tsx b/examples/app-ts/src/entry-client.tsx similarity index 100% rename from examples/basic-ts/src/entry-client.tsx rename to examples/app-ts/src/entry-client.tsx diff --git a/examples/basic-ts/src/entry-server.tsx b/examples/app-ts/src/entry-server.tsx similarity index 100% rename from examples/basic-ts/src/entry-server.tsx rename to examples/app-ts/src/entry-server.tsx diff --git a/packages/create-solid/templates/app-ts/src/root.tsx b/examples/app-ts/src/root.tsx similarity index 80% rename from packages/create-solid/templates/app-ts/src/root.tsx rename to examples/app-ts/src/root.tsx index 8c73a97cb..ddbc27eba 100644 --- a/packages/create-solid/templates/app-ts/src/root.tsx +++ b/examples/app-ts/src/root.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { Links, Meta, Outlet, Scripts } from "solid-start/components"; +import { Links, Meta, Routes, Scripts } from "solid-start/components"; export default function Root() { return ( @@ -11,7 +11,7 @@ export default function Root() { - + diff --git a/examples/basic-ts/src/routes/index.css b/examples/app-ts/src/routes/index.css similarity index 100% rename from examples/basic-ts/src/routes/index.css rename to examples/app-ts/src/routes/index.css diff --git a/examples/basic-ts/src/routes/index.tsx b/examples/app-ts/src/routes/index.tsx similarity index 100% rename from examples/basic-ts/src/routes/index.tsx rename to examples/app-ts/src/routes/index.tsx diff --git a/examples/basic-ts/tsconfig.json b/examples/app-ts/tsconfig.json similarity index 100% rename from examples/basic-ts/tsconfig.json rename to examples/app-ts/tsconfig.json diff --git a/examples/basic-ts/vite.config.ts b/examples/app-ts/vite.config.ts similarity index 100% rename from examples/basic-ts/vite.config.ts rename to examples/app-ts/vite.config.ts diff --git a/packages/create-solid/templates/app-ts/README.md b/examples/app/README.md similarity index 100% rename from packages/create-solid/templates/app-ts/README.md rename to examples/app/README.md diff --git a/packages/create-solid/templates/app/jsconfig.json b/examples/app/jsconfig.json similarity index 100% rename from packages/create-solid/templates/app/jsconfig.json rename to examples/app/jsconfig.json diff --git a/packages/create-solid/templates/app/package.json b/examples/app/package.json similarity index 93% rename from packages/create-solid/templates/app/package.json rename to examples/app/package.json index 7f42dce4d..38464b303 100644 --- a/packages/create-solid/templates/app/package.json +++ b/examples/app/package.json @@ -1,5 +1,5 @@ { - "name": "~TODO~", + "name": "example-app", "scripts": { "dev": "solid-start dev", "build": "solid-start build", diff --git a/examples/hackernews/public/favicon.ico b/examples/app/public/favicon.ico similarity index 100% rename from examples/hackernews/public/favicon.ico rename to examples/app/public/favicon.ico diff --git a/packages/create-solid/templates/app-ts/src/components/Counter.css b/examples/app/src/components/Counter.css similarity index 100% rename from packages/create-solid/templates/app-ts/src/components/Counter.css rename to examples/app/src/components/Counter.css diff --git a/packages/create-solid/templates/app/src/components/Counter.jsx b/examples/app/src/components/Counter.jsx similarity index 100% rename from packages/create-solid/templates/app/src/components/Counter.jsx rename to examples/app/src/components/Counter.jsx diff --git a/packages/create-solid/templates/app/src/entry-client.jsx b/examples/app/src/entry-client.jsx similarity index 100% rename from packages/create-solid/templates/app/src/entry-client.jsx rename to examples/app/src/entry-client.jsx diff --git a/packages/create-solid/templates/app/src/entry-server.jsx b/examples/app/src/entry-server.jsx similarity index 100% rename from packages/create-solid/templates/app/src/entry-server.jsx rename to examples/app/src/entry-server.jsx diff --git a/packages/create-solid/templates/app/src/root.jsx b/examples/app/src/root.jsx similarity index 80% rename from packages/create-solid/templates/app/src/root.jsx rename to examples/app/src/root.jsx index 8c73a97cb..ddbc27eba 100644 --- a/packages/create-solid/templates/app/src/root.jsx +++ b/examples/app/src/root.jsx @@ -1,5 +1,5 @@ // @refresh reload -import { Links, Meta, Outlet, Scripts } from "solid-start/components"; +import { Links, Meta, Routes, Scripts } from "solid-start/components"; export default function Root() { return ( @@ -11,7 +11,7 @@ export default function Root() { - + diff --git a/packages/create-solid/templates/app-ts/src/routes/index.css b/examples/app/src/routes/index.css similarity index 100% rename from packages/create-solid/templates/app-ts/src/routes/index.css rename to examples/app/src/routes/index.css diff --git a/packages/create-solid/templates/app/src/routes/index.jsx b/examples/app/src/routes/index.jsx similarity index 100% rename from packages/create-solid/templates/app/src/routes/index.jsx rename to examples/app/src/routes/index.jsx diff --git a/packages/create-solid/templates/app/vite.config.js b/examples/app/vite.config.js similarity index 100% rename from packages/create-solid/templates/app/vite.config.js rename to examples/app/vite.config.js diff --git a/examples/hackernews/.gitignore b/examples/hackernews-ts/.gitignore similarity index 100% rename from examples/hackernews/.gitignore rename to examples/hackernews-ts/.gitignore diff --git a/examples/hackernews/README.md b/examples/hackernews-ts/README.md similarity index 100% rename from examples/hackernews/README.md rename to examples/hackernews-ts/README.md diff --git a/examples/hackernews/package.json b/examples/hackernews-ts/package.json similarity index 89% rename from examples/hackernews/package.json rename to examples/hackernews-ts/package.json index fd0df1466..bececda05 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews-ts/package.json @@ -3,8 +3,7 @@ "scripts": { "dev": "solid-start dev", "build": "solid-start build", - "start": "wrangler dev", - "deploy": "wrangler publish" + "start": "solid-start start" }, "type": "module", "main": "./dist/index.js", diff --git a/packages/create-solid/templates/app-ts/public/favicon.ico b/examples/hackernews-ts/public/favicon.ico similarity index 100% rename from packages/create-solid/templates/app-ts/public/favicon.ico rename to examples/hackernews-ts/public/favicon.ico diff --git a/examples/hackernews/public/img/android-chrome-192x192.png b/examples/hackernews-ts/public/img/android-chrome-192x192.png similarity index 100% rename from examples/hackernews/public/img/android-chrome-192x192.png rename to examples/hackernews-ts/public/img/android-chrome-192x192.png diff --git a/examples/hackernews/public/img/android-chrome-512x512.png b/examples/hackernews-ts/public/img/android-chrome-512x512.png similarity index 100% rename from examples/hackernews/public/img/android-chrome-512x512.png rename to examples/hackernews-ts/public/img/android-chrome-512x512.png diff --git a/examples/hackernews/public/img/apple-touch-icon.png b/examples/hackernews-ts/public/img/apple-touch-icon.png similarity index 100% rename from examples/hackernews/public/img/apple-touch-icon.png rename to examples/hackernews-ts/public/img/apple-touch-icon.png diff --git a/examples/hackernews/public/img/favicon-16x16.png b/examples/hackernews-ts/public/img/favicon-16x16.png similarity index 100% rename from examples/hackernews/public/img/favicon-16x16.png rename to examples/hackernews-ts/public/img/favicon-16x16.png diff --git a/examples/hackernews/public/img/favicon-32x32.png b/examples/hackernews-ts/public/img/favicon-32x32.png similarity index 100% rename from examples/hackernews/public/img/favicon-32x32.png rename to examples/hackernews-ts/public/img/favicon-32x32.png diff --git a/examples/hackernews/public/img/mstile-150x150.png b/examples/hackernews-ts/public/img/mstile-150x150.png similarity index 100% rename from examples/hackernews/public/img/mstile-150x150.png rename to examples/hackernews-ts/public/img/mstile-150x150.png diff --git a/examples/hackernews/public/manifest.webmanifest b/examples/hackernews-ts/public/manifest.webmanifest similarity index 100% rename from examples/hackernews/public/manifest.webmanifest rename to examples/hackernews-ts/public/manifest.webmanifest diff --git a/examples/hackernews/public/robots.txt b/examples/hackernews-ts/public/robots.txt similarity index 100% rename from examples/hackernews/public/robots.txt rename to examples/hackernews-ts/public/robots.txt diff --git a/examples/hackernews/public/sw.js b/examples/hackernews-ts/public/sw.js similarity index 100% rename from examples/hackernews/public/sw.js rename to examples/hackernews-ts/public/sw.js diff --git a/examples/hackernews/src/components/comment.tsx b/examples/hackernews-ts/src/components/comment.tsx similarity index 100% rename from examples/hackernews/src/components/comment.tsx rename to examples/hackernews-ts/src/components/comment.tsx diff --git a/examples/hackernews/src/components/nav.tsx b/examples/hackernews-ts/src/components/nav.tsx similarity index 100% rename from examples/hackernews/src/components/nav.tsx rename to examples/hackernews-ts/src/components/nav.tsx diff --git a/examples/hackernews/src/components/story.tsx b/examples/hackernews-ts/src/components/story.tsx similarity index 100% rename from examples/hackernews/src/components/story.tsx rename to examples/hackernews-ts/src/components/story.tsx diff --git a/examples/hackernews/src/entry-client.tsx b/examples/hackernews-ts/src/entry-client.tsx similarity index 100% rename from examples/hackernews/src/entry-client.tsx rename to examples/hackernews-ts/src/entry-client.tsx diff --git a/examples/hackernews/src/entry-server.tsx b/examples/hackernews-ts/src/entry-server.tsx similarity index 100% rename from examples/hackernews/src/entry-server.tsx rename to examples/hackernews-ts/src/entry-server.tsx diff --git a/examples/hackernews/src/lib/api.ts b/examples/hackernews-ts/src/lib/api.ts similarity index 100% rename from examples/hackernews/src/lib/api.ts rename to examples/hackernews-ts/src/lib/api.ts diff --git a/examples/hackernews/src/root.css b/examples/hackernews-ts/src/root.css similarity index 100% rename from examples/hackernews/src/root.css rename to examples/hackernews-ts/src/root.css diff --git a/examples/hackernews/src/root.tsx b/examples/hackernews-ts/src/root.tsx similarity index 91% rename from examples/hackernews/src/root.tsx rename to examples/hackernews-ts/src/root.tsx index 0f9f3ad03..368248ff3 100644 --- a/examples/hackernews/src/root.tsx +++ b/examples/hackernews-ts/src/root.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { Links, Outlet, Scripts } from "solid-start/components"; +import { Links, Routes, Scripts } from "solid-start/components"; import { Suspense } from "solid-js"; import { isServer } from "solid-js/web"; import Nav from "./components/nav"; @@ -19,7 +19,7 @@ export default function Root() {