diff --git a/README.md b/README.md index 5f6bf50c..f3be2cfc 100644 --- a/README.md +++ b/README.md @@ -1,141 +1,31 @@ -

- Solid Vite Templates -

+[![Banner](https://assets.solidjs.com/banner?project=templates&type=core)](https://github.com/solidjs) -# Solid Templates (using [vite](https://vitejs.dev/)) +[![Discord](https://img.shields.io/discord/722131463138705510?label=join%20server&style=for-the-badge&color=5865F2&logo=discord&logoColor=white)](https://discord.com/invite/solidjs) +[![Reddit](https://img.shields.io/reddit/subreddit-subscribers/solidjs?style=for-the-badge&color=FF4500&logo=reddit&logoColor=white)](https://reddit.com/r/solidjs) -This repository holds most of the official starter templates for [vite](https://vitejs.dev/). +## Get Started -You get: - -- HMR out of the box -- Minimal bundle size -- All the vite features - -### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs) - -## Get started - -Those templates dependencies are maintained via [pnpm](https://pnpm.io) via `pnpm up -Lri`. - -This is the reason you see a `pnpm-lock.yaml`. That being said, any package manager will work. This file can be safely be removed once you clone a template. - -These templates are meant to be used as is via the [degit](https://github.com/Rich-Harris/degit) utility. - -```bash -# Typescript basic template -$ npx degit solidjs/templates/vanilla/basic my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` - -```bash -# Typescript bare template -$ npx degit solidjs/templates/vanilla/bare my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` +Import a template project using ```bash -# Typescript unocss template -$ npx degit solidjs/templates/vanilla/with-unocss my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install +# use preferred package manager +npm create solid@latest ``` -```bash -# Typescript tailwindcss template + solid-router with config-based routing -$ npx degit solidjs/templates/vanilla/with-solid-router my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` - -```bash -# Typescript vite-plugin-pages file-based routing -$ npx degit solidjs/templates/vanilla/with-vite-plugin-pages my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` - -```bash -# Typescript bootstrap (5) template -$ npx degit solidjs/templates/vanilla/with-bootstrap my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` +## Missing a Template? -```bash -# Typescript + tailwindcss template -$ npx degit solidjs/templates/vanilla/with-tailwindcss my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` +Want a template with your favorite library? Create a pull request! Copy an existing template, modify it, name it with a `with-` prefix, and submit a PR. -```bash -# Typescript + sass template -$ npx degit solidjs/templates/vanilla/with-sass my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` - -```bash -# Typescript + vitest template -$ npx degit solidjs/templates/vanilla/with-vitest my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` - -```bash -# Typescript + vitest browser mode template -$ npx degit solidjs/templates/vanilla/with-vitest-browser-mode my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` +## Contributing -```bash -# Typescript + uvu template -$ npx degit solidjs/templates/vanilla/with-uvu my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` +This project uses [pnpm](https://pnpm.io) for dependency management. Install it to test or contribute to templates. -```bash -# TanStack Router -$ npx degit solidjs/templates/vanilla/with-tanstack-router-config-based my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` +Update dependencies with ```bash -# TanStack Router File Based -$ npx degit solidjs/templates/vanilla/with-tanstack-router-file-based my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install +pnpm up -Lri ``` -```bash -# TanStack Start -$ npx degit solidjs/templates/tanstack-start my-solid-project -$ cd my-solid-project -$ npm install # or pnpm install or yarn install -``` - -## I don't see a template that matches my need? - -You wish there was a template with your favorite library? - -Feel free to make a pull request. Copy one of the template already available, tweak it, name it properly and make a PR. See [contributing](#contributing) below. - -## Contributing - -This project is managed with [pnpm](https://pnpm.io). You should [install it](https://pnpm.io/installation) first to test out your template or contribute to an existing one. - -You can create your own template and prefix it `with-` and give it a name that describe the purpose. - -To update all dependencies you can run: - -`pnpm up -Lri` - ## Troubleshooting It appears that Webstorm generate some weird triggers when saving a file. In order to prevent that you can follow [this thread](https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000154544-I-m-having-a-huge-problem-with-Webstorm-and-react-hot-loader-) and disable the **"Safe Write"** option in **"Settings | Appearance & Behavior | System Settings"**. diff --git a/banner.png b/banner.png deleted file mode 100644 index ad0aad03..00000000 Binary files a/banner.png and /dev/null differ diff --git a/solid-start/bare/README.md b/solid-start/bare/README.md index 128403d0..63f7b2dc 100644 --- a/solid-start/bare/README.md +++ b/solid-start/bare/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **bare** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st bare ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st bare ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t bare +``` diff --git a/solid-start/bare/package.json b/solid-start/bare/package.json index eb9f58a8..aa50a0b9 100644 --- a/solid-start/bare/package.json +++ b/solid-start/bare/package.json @@ -2,7 +2,7 @@ "name": "example-bare", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/bare/public/favicon.ico b/solid-start/bare/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/bare/public/favicon.ico and /dev/null differ diff --git a/solid-start/bare/public/favicon.svg b/solid-start/bare/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/bare/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/bare/src/entry-server.tsx b/solid-start/bare/src/entry-server.tsx index 401eff83..4cb06da2 100644 --- a/solid-start/bare/src/entry-server.tsx +++ b/solid-start/bare/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/basic/README.md b/solid-start/basic/README.md index 128403d0..69ad8ec5 100644 --- a/solid-start/basic/README.md +++ b/solid-start/basic/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **basic** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st basic ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st basic ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t basic +``` diff --git a/solid-start/basic/package.json b/solid-start/basic/package.json index 7d2dd1ee..9c188812 100644 --- a/solid-start/basic/package.json +++ b/solid-start/basic/package.json @@ -2,7 +2,7 @@ "name": "example-basic", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start", "version": "vinxi version" diff --git a/solid-start/basic/public/favicon.ico b/solid-start/basic/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/basic/public/favicon.ico and /dev/null differ diff --git a/solid-start/basic/public/favicon.svg b/solid-start/basic/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/basic/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/basic/src/entry-server.tsx b/solid-start/basic/src/entry-server.tsx index 401eff83..4cb06da2 100644 --- a/solid-start/basic/src/entry-server.tsx +++ b/solid-start/basic/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-auth/README.md b/solid-start/with-auth/README.md index 42bfa99d..b425ec8b 100644 --- a/solid-start/with-auth/README.md +++ b/solid-start/with-auth/README.md @@ -1,6 +1,6 @@ # SolidStart Template -The **with-auth** example demonstrates native, context-based authentication featuring OAuth and email-password login. +The **with-auth** example showcases native, context-based authentication using both OAuth and email-password login. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). ## Installation @@ -8,12 +8,12 @@ Generate the **with-auth** template using your preferred package manager ```bash # using npm -npm create solid@latest -- -s -t with-auth +npm create solid@latest -- -st with-auth ``` ```bash # using pnpm -pnpm create solid@latest -s -t with-auth +pnpm create solid@latest -st with-auth ``` ```bash diff --git a/solid-start/with-auth/package.json b/solid-start/with-auth/package.json index 00d3a6fa..47d6a60e 100644 --- a/solid-start/with-auth/package.json +++ b/solid-start/with-auth/package.json @@ -2,7 +2,7 @@ "name": "example-with-auth", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/with-authjs/README.md b/solid-start/with-authjs/README.md index f2f3a5ea..0242c074 100644 --- a/solid-start/with-authjs/README.md +++ b/solid-start/with-authjs/README.md @@ -1,16 +1,31 @@ -# SolidStart + AuthJS +# SolidStart Template -## Setup a Discord app +Everything you need to build an [AuthJS](https://authjs.dev) authenticated Solid project. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -In order to run this example, you need to setup i.e. a Discord app in here: https://discord.com/developers/applications/, to get a client secret and client id which should be added to the .env file. Also, in the Discord app settings under OAuth2, set the Return URL to: http://localhost:3000/api/auth/callback/discord +## Installation + +Generate the **with-authjs** template using your preferred package manager + +```bash +# using npm +npm create solid@latest -- -st with-authjs +``` -## AuthJS +```bash +# using pnpm +pnpm create solid@latest -st with-authjs +``` -Everything you need to build an [AuthJS](https://authjs.dev/) authenticated Solid project, powered by [`solid-start`](https://start.solidjs.com); +```bash +# using bun +bun create solid@latest --s --t with-authjs +``` -This will start a production server on port `3000`. +## Configuration + +In order to run this example, you need to setup i.e. a Discord app in here: https://discord.com/developers/applications/, to get a client secret and client id which should be added to the .env file. Also, in the Discord app settings under OAuth2, set the Return URL to: http://localhost:3000/api/auth/callback/discord -### Enviroment Variables +Enviroment Variables: - `DISCORD_ID`= - `DISCORD_SECRET`= diff --git a/solid-start/with-authjs/package.json b/solid-start/with-authjs/package.json index ad124318..996ea6dd 100644 --- a/solid-start/with-authjs/package.json +++ b/solid-start/with-authjs/package.json @@ -1,7 +1,7 @@ { "name": "example-with-authjs", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start", "lint": "eslint --fix \"**/*.{ts,tsx,js,jsx}\"" diff --git a/solid-start/with-authjs/public/favicon.ico b/solid-start/with-authjs/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-authjs/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-authjs/public/favicon.svg b/solid-start/with-authjs/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-authjs/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-authjs/src/entry-server.tsx b/solid-start/with-authjs/src/entry-server.tsx index 407a2afa..f67414c9 100644 --- a/solid-start/with-authjs/src/entry-server.tsx +++ b/solid-start/with-authjs/src/entry-server.tsx @@ -1,4 +1,4 @@ -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-drizzle/README.md b/solid-start/with-drizzle/README.md index 97496cb4..09e34863 100644 --- a/solid-start/with-drizzle/README.md +++ b/solid-start/with-drizzle/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +The **with-drizzle** example shows how to use [Drizzle](https://orm.drizzle.team) with local SQLite storage. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-drizzle** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-drizzle ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev +# using pnpm +pnpm create solid@latest -st with-drizzle ``` -## Building - -Solid apps are built with _adapters_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different adapter, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t with-drizzle +``` diff --git a/solid-start/with-drizzle/package.json b/solid-start/with-drizzle/package.json index c3d9146e..40707ade 100644 --- a/solid-start/with-drizzle/package.json +++ b/solid-start/with-drizzle/package.json @@ -2,7 +2,7 @@ "name": "example-with-drizzle", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/with-drizzle/public/favicon.ico b/solid-start/with-drizzle/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-drizzle/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-drizzle/public/favicon.svg b/solid-start/with-drizzle/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-drizzle/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-drizzle/src/entry-server.tsx b/solid-start/with-drizzle/src/entry-server.tsx index 6d6e41a2..2f639495 100644 --- a/solid-start/with-drizzle/src/entry-server.tsx +++ b/solid-start/with-drizzle/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { StartServer, createHandler } from "@solidjs/start/server"; +import { StartServer, createHandler } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-mdx/README.md b/solid-start/with-mdx/README.md index 128403d0..b5daebc6 100644 --- a/solid-start/with-mdx/README.md +++ b/solid-start/with-mdx/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +The **with-mdx** example enables JSX in markdown routes. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-mdx** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-mdx ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st with-mdx ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t with-mdx +``` diff --git a/solid-start/with-mdx/package.json b/solid-start/with-mdx/package.json index 50e2ce1c..b53a2675 100644 --- a/solid-start/with-mdx/package.json +++ b/solid-start/with-mdx/package.json @@ -2,7 +2,7 @@ "name": "example-with-mdx", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/with-mdx/public/favicon.ico b/solid-start/with-mdx/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-mdx/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-mdx/public/favicon.svg b/solid-start/with-mdx/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-mdx/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-mdx/src/entry-server.tsx b/solid-start/with-mdx/src/entry-server.tsx index 401eff83..4cb06da2 100644 --- a/solid-start/with-mdx/src/entry-server.tsx +++ b/solid-start/with-mdx/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-prisma/README.md b/solid-start/with-prisma/README.md index 128403d0..ba8bbc94 100644 --- a/solid-start/with-prisma/README.md +++ b/solid-start/with-prisma/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +[Prisma](https://www.prisma.io) is a serverless Postgres database. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-prisma** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-prisma ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st with-prisma ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t with-prisma +``` diff --git a/solid-start/with-prisma/package.json b/solid-start/with-prisma/package.json index af2cb644..0f61f388 100644 --- a/solid-start/with-prisma/package.json +++ b/solid-start/with-prisma/package.json @@ -2,7 +2,7 @@ "name": "example-with-prisma", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/with-prisma/public/favicon.ico b/solid-start/with-prisma/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-prisma/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-prisma/public/favicon.svg b/solid-start/with-prisma/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-prisma/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-prisma/src/entry-server.tsx b/solid-start/with-prisma/src/entry-server.tsx index 401eff83..4cb06da2 100644 --- a/solid-start/with-prisma/src/entry-server.tsx +++ b/solid-start/with-prisma/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-solid-styled/README.md b/solid-start/with-solid-styled/README.md index 128403d0..0abc4330 100644 --- a/solid-start/with-solid-styled/README.md +++ b/solid-start/with-solid-styled/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +The **with-solid-styled** example demonstrates reactive stylesheets in SolidStart. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-solid-styled** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-solid-styled ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st with-solid-styled ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t with-solid-styled +``` diff --git a/solid-start/with-solid-styled/package.json b/solid-start/with-solid-styled/package.json index 614914b2..84788413 100644 --- a/solid-start/with-solid-styled/package.json +++ b/solid-start/with-solid-styled/package.json @@ -2,7 +2,7 @@ "name": "example-with-solid-styled", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/with-solid-styled/public/favicon.ico b/solid-start/with-solid-styled/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-solid-styled/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-solid-styled/public/favicon.svg b/solid-start/with-solid-styled/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-solid-styled/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-solid-styled/src/entry-server.tsx b/solid-start/with-solid-styled/src/entry-server.tsx index 401eff83..4cb06da2 100644 --- a/solid-start/with-solid-styled/src/entry-server.tsx +++ b/solid-start/with-solid-styled/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-solidbase/README.md b/solid-start/with-solidbase/README.md index 9b677fbd..a1339a9e 100644 --- a/solid-start/with-solidbase/README.md +++ b/solid-start/with-solidbase/README.md @@ -1,32 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com) and [SolidBase](https://solidbase.kobalte.dev/); +[SolidBase](https://solidbase.dev) simplifies SSG development with built-in support for fast, pre-rendered Markdown and MDX pages. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-solidbase** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-solidbase ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st with-solidbase ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. - -## This project was created with the [Solid CLI](https://solid-cli.netlify.app) +```bash +# using bun +bun create solid@latest --s --t with-solidbase +``` diff --git a/solid-start/with-solidbase/package.json b/solid-start/with-solidbase/package.json index 2684902f..ecb39e1e 100644 --- a/solid-start/with-solidbase/package.json +++ b/solid-start/with-solidbase/package.json @@ -2,7 +2,7 @@ "name": "example-with-solidbase", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start", "version": "vinxi version" diff --git a/solid-start/with-solidbase/public/favicon.ico b/solid-start/with-solidbase/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-solidbase/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-solidbase/public/favicon.svg b/solid-start/with-solidbase/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-solidbase/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-solidbase/src/entry-server.tsx b/solid-start/with-solidbase/src/entry-server.tsx index 6bd7f67d..202ab8f2 100644 --- a/solid-start/with-solidbase/src/entry-server.tsx +++ b/solid-start/with-solidbase/src/entry-server.tsx @@ -1,6 +1,6 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; -import {getHtmlProps} from "@kobalte/solidbase/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; +import { getHtmlProps } from '@kobalte/solidbase/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-strict-csp/README.md b/solid-start/with-strict-csp/README.md index 80ffc20d..4a2912d0 100644 --- a/solid-start/with-strict-csp/README.md +++ b/solid-start/with-strict-csp/README.md @@ -1,37 +1,22 @@ -# Content Security Policy with Nonce +# SolidStart Template -This example demonstrates how to implement a strict Content Security Policy (CSP) with a nonce in a SolidStart application. +Secure your app with a strict Content Security Policy (_CSP_). For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## How to Use +## Installation -You can use the Solid CLI to bootstrap the example with one of the following commands based on your package manager preference: - -**npm:** - -```bash -npm init solid@latest --solidstart --ts --template with-strict-csp my-app-with-strict-csp -``` - -**pnpm:** +Generate the **with-strict-csp** template using your preferred package manager ```bash -pnpm create solid --solidstart --ts --template with-strict-csp my-app-with-strict-csp +# using npm +npm create solid@latest -- -st with-strict-csp ``` -**yarn:** - ```bash -yarn create solid@latest --solidstart --ts --template with-strict-csp my-app-with-strict-csp +# using pnpm +pnpm create solid@latest -st with-strict-csp ``` -**bun:** - -```bash -bun create solid@latest --solidstart --ts --template with-strict-csp my-app-with-strict-csp -``` - -**deno:** - ```bash -deno init --npm solid@latest --solidstart --ts --template with-strict-csp my-app-with-strict-csp +# using bun +bun create solid@latest --s --t with-strict-csp ``` diff --git a/solid-start/with-strict-csp/package.json b/solid-start/with-strict-csp/package.json index 7d2f6f75..98c7bdf2 100644 --- a/solid-start/with-strict-csp/package.json +++ b/solid-start/with-strict-csp/package.json @@ -1,8 +1,8 @@ { - "name": "example-bare", + "name": "example-with-strict-csp", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/with-strict-csp/public/favicon.ico b/solid-start/with-strict-csp/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-strict-csp/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-strict-csp/public/favicon.svg b/solid-start/with-strict-csp/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-strict-csp/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-strict-csp/src/entry-server.tsx b/solid-start/with-strict-csp/src/entry-server.tsx index ba12e1cd..44fd9662 100644 --- a/solid-start/with-strict-csp/src/entry-server.tsx +++ b/solid-start/with-strict-csp/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler( () => ( @@ -8,8 +8,11 @@ export default createHandler( - - + + {assets} @@ -20,5 +23,5 @@ export default createHandler( )} /> ), - event => ({ nonce: event.locals.nonce }) + (event) => ({ nonce: event.locals.nonce }), ); diff --git a/solid-start/with-tailwindcss/README.md b/solid-start/with-tailwindcss/README.md index 128403d0..99c0d5f8 100644 --- a/solid-start/with-tailwindcss/README.md +++ b/solid-start/with-tailwindcss/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +The **with-tailwindcss** example demonstrates how to use [tailwindcss](https://tailwindcss.com) in SolidStart. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-tailwindcss** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-tailwindcss ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st with-tailwindcss ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t with-tailwindcss +``` diff --git a/solid-start/with-tailwindcss/package.json b/solid-start/with-tailwindcss/package.json index d41c2d63..347ce742 100644 --- a/solid-start/with-tailwindcss/package.json +++ b/solid-start/with-tailwindcss/package.json @@ -2,7 +2,7 @@ "name": "example-with-tailwindcss", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/with-tailwindcss/public/favicon.ico b/solid-start/with-tailwindcss/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-tailwindcss/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-tailwindcss/public/favicon.svg b/solid-start/with-tailwindcss/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-tailwindcss/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-tailwindcss/src/entry-server.tsx b/solid-start/with-tailwindcss/src/entry-server.tsx index 401eff83..4cb06da2 100644 --- a/solid-start/with-tailwindcss/src/entry-server.tsx +++ b/solid-start/with-tailwindcss/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-tanstack-router/README.md b/solid-start/with-tanstack-router/README.md index 128403d0..9dacc0e2 100644 --- a/solid-start/with-tanstack-router/README.md +++ b/solid-start/with-tanstack-router/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +[Tanstack Router](https://tanstack.com/router/latest) enables type safe routing. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-tanstack-router** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-tanstack-router ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st with-tanstack-router ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t with-tanstack-router +``` diff --git a/solid-start/with-tanstack-router/package.json b/solid-start/with-tanstack-router/package.json index 14617208..e281b6fa 100644 --- a/solid-start/with-tanstack-router/package.json +++ b/solid-start/with-tanstack-router/package.json @@ -2,7 +2,7 @@ "name": "with-tanstack-router", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start", "version": "vinxi version" diff --git a/solid-start/with-tanstack-router/public/favicon.ico b/solid-start/with-tanstack-router/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-tanstack-router/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-tanstack-router/public/favicon.svg b/solid-start/with-tanstack-router/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-tanstack-router/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-tanstack-router/src/entry-server.tsx b/solid-start/with-tanstack-router/src/entry-server.tsx index e1f708bc..b8079b0c 100644 --- a/solid-start/with-tanstack-router/src/entry-server.tsx +++ b/solid-start/with-tanstack-router/src/entry-server.tsx @@ -1,16 +1,16 @@ // @refresh reload -import { createHandler, FetchEvent, StartServer } from "@solidjs/start/server"; -import { createMemoryHistory } from "@tanstack/solid-router"; -import { router } from "./router"; +import { createHandler, FetchEvent, StartServer } from '@solidjs/start/server'; +import { createMemoryHistory } from '@tanstack/solid-router'; +import { router } from './router'; const routerLoad = async (event: FetchEvent) => { const url = new URL(event.request.url); - const path = url.href.replace(url.origin, ""); + const path = url.href.replace(url.origin, ''); router.update({ history: createMemoryHistory({ - initialEntries: [path] - }) + initialEntries: [path], + }), }); await router.load(); @@ -23,8 +23,11 @@ export default createHandler( - - + + {assets} @@ -36,5 +39,5 @@ export default createHandler( /> ), undefined, - routerLoad + routerLoad, ); diff --git a/solid-start/with-trpc/README.md b/solid-start/with-trpc/README.md index 128403d0..bc0b153a 100644 --- a/solid-start/with-trpc/README.md +++ b/solid-start/with-trpc/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +[tRPC](https://trpc.io) enables typesafe API routes. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-trpc** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-trpc ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st with-trpc ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t with-trpc +``` diff --git a/solid-start/with-trpc/package.json b/solid-start/with-trpc/package.json index 4b975c74..ef6034f3 100644 --- a/solid-start/with-trpc/package.json +++ b/solid-start/with-trpc/package.json @@ -2,7 +2,7 @@ "name": "example-with-trpc", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/with-trpc/public/favicon.ico b/solid-start/with-trpc/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-trpc/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-trpc/public/favicon.svg b/solid-start/with-trpc/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-trpc/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-trpc/src/entry-server.tsx b/solid-start/with-trpc/src/entry-server.tsx index 401eff83..4cb06da2 100644 --- a/solid-start/with-trpc/src/entry-server.tsx +++ b/solid-start/with-trpc/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-unocss/README.md b/solid-start/with-unocss/README.md index 128403d0..19453635 100644 --- a/solid-start/with-unocss/README.md +++ b/solid-start/with-unocss/README.md @@ -1,30 +1,22 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +[UnoCSS](https://unocss.dev) is a fast and customizable CSS engine. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-unocss** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-unocss ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st with-unocss ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t with-unocss +``` diff --git a/solid-start/with-unocss/package.json b/solid-start/with-unocss/package.json index 86776c08..ca7bb179 100644 --- a/solid-start/with-unocss/package.json +++ b/solid-start/with-unocss/package.json @@ -2,7 +2,7 @@ "name": "example-with-unocss", "type": "module", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start" }, diff --git a/solid-start/with-unocss/public/favicon.ico b/solid-start/with-unocss/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-unocss/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-unocss/public/favicon.svg b/solid-start/with-unocss/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-unocss/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-unocss/src/entry-server.tsx b/solid-start/with-unocss/src/entry-server.tsx index 401eff83..4cb06da2 100644 --- a/solid-start/with-unocss/src/entry-server.tsx +++ b/solid-start/with-unocss/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets} diff --git a/solid-start/with-vitest/README.md b/solid-start/with-vitest/README.md index f8a710db..a9f7be28 100644 --- a/solid-start/with-vitest/README.md +++ b/solid-start/with-vitest/README.md @@ -1,33 +1,25 @@ -# SolidStart +# SolidStart Template -Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); +[Vitest](https://vitest.dev) enables unit tests in your app. For more information on SolidStart, refer to the [README](https://github.com/solidjs/solid-start/tree/main/packages/start#readme) or visit the official [documentation](https://docs.solidjs.com/solid-start/). -## Creating a project +## Installation -```bash -# create a new project in the current directory -npm init solid@latest +Generate the **with-vitest** template using your preferred package manager -# create a new project in my-app -npm init solid@latest my-app +```bash +# using npm +npm create solid@latest -- -st with-vitest ``` -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - ```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open +# using pnpm +pnpm create solid@latest -st with-vitest ``` -## Building - -Solid apps are built with _presets_, which optimise your project for deployment to different environments. - -By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. +```bash +# using bun +bun create solid@latest --s --t with-vitest +``` ## Testing @@ -35,6 +27,6 @@ Tests are written with `vitest`, `@solidjs/testing-library` and `@testing-librar To run them, simply start: -```sh +```bash npm test ``` diff --git a/solid-start/with-vitest/package.json b/solid-start/with-vitest/package.json index 853af8b8..bde25c13 100644 --- a/solid-start/with-vitest/package.json +++ b/solid-start/with-vitest/package.json @@ -1,7 +1,7 @@ { "name": "example-with-vitest", "scripts": { - "dev": "vinxi dev", + "dev": "vinxi dev --port 3000", "build": "vinxi build", "start": "vinxi start", "test": "vitest run", diff --git a/solid-start/with-vitest/public/favicon.ico b/solid-start/with-vitest/public/favicon.ico deleted file mode 100644 index fb282da0..00000000 Binary files a/solid-start/with-vitest/public/favicon.ico and /dev/null differ diff --git a/solid-start/with-vitest/public/favicon.svg b/solid-start/with-vitest/public/favicon.svg new file mode 100644 index 00000000..e9a615cf --- /dev/null +++ b/solid-start/with-vitest/public/favicon.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/solid-start/with-vitest/src/entry-server.tsx b/solid-start/with-vitest/src/entry-server.tsx index 401eff83..4cb06da2 100644 --- a/solid-start/with-vitest/src/entry-server.tsx +++ b/solid-start/with-vitest/src/entry-server.tsx @@ -1,5 +1,5 @@ // @refresh reload -import { createHandler, StartServer } from "@solidjs/start/server"; +import { createHandler, StartServer } from '@solidjs/start/server'; export default createHandler(() => ( ( - + {assets}