-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #848 from simonihmig/solid-start-app
Add solid-start demo app boilerplate
- Loading branch information
Showing
14 changed files
with
3,036 additions
and
269 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
dist | ||
.solid | ||
.output | ||
.vercel | ||
.netlify | ||
.vinxi | ||
app.config.timestamp_*.js | ||
|
||
# Environment | ||
.env | ||
.env*.local | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
*.launch | ||
.settings/ | ||
|
||
# Temp | ||
gitignore | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# SolidStart | ||
|
||
Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); | ||
|
||
## Creating a project | ||
|
||
```bash | ||
# create a new project in the current directory | ||
npm init solid@latest | ||
|
||
# create a new project in my-app | ||
npm init solid@latest my-app | ||
``` | ||
|
||
## 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 | ||
``` | ||
|
||
## 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { defineConfig } from "@solidjs/start/config"; | ||
|
||
export default defineConfig({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "solid-start", | ||
"private": true, | ||
"description": "Demo app using SolidStart", | ||
"repository": "", | ||
"license": "MIT", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vinxi dev", | ||
"build": "vinxi build", | ||
"start": "vinxi start", | ||
"version": "vinxi version" | ||
}, | ||
"dependencies": { | ||
"@solidjs/meta": "^0.29.4", | ||
"@solidjs/router": "^0.15.0", | ||
"@solidjs/start": "^1.0.10", | ||
"solid-js": "^1.9.2", | ||
"vinxi": "^0.5.1" | ||
}, | ||
"engines": { | ||
"node": ">=18" | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
font-family: "Helvetica Neue", sans-serif; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { MetaProvider, Title } 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> | ||
<Title>SolidStart - ResponsiveImage</Title> | ||
<Suspense>{props.children}</Suspense> | ||
</MetaProvider> | ||
)} | ||
> | ||
<FileRoutes /> | ||
</Router> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @refresh reload | ||
import { mount, StartClient } from "@solidjs/start/client"; | ||
|
||
mount(() => <StartClient />, document.getElementById("app")!); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// @refresh reload | ||
import { createHandler, StartServer } from "@solidjs/start/server"; | ||
|
||
export default createHandler(() => ( | ||
<StartServer | ||
document={({ assets, children, scripts }) => ( | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
{assets} | ||
</head> | ||
<body> | ||
<div id="app">{children}</div> | ||
{scripts} | ||
</body> | ||
</html> | ||
)} | ||
/> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference types="@solidjs/start/env" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Title } from "@solidjs/meta"; | ||
import { HttpStatusCode } from "@solidjs/start"; | ||
|
||
export default function NotFound() { | ||
return ( | ||
<main> | ||
<Title>Not Found</Title> | ||
<HttpStatusCode code={404} /> | ||
<h1>Page Not Found</h1> | ||
<p> | ||
Visit{" "} | ||
<a href="https://start.solidjs.com" target="_blank"> | ||
start.solidjs.com | ||
</a>{" "} | ||
to learn how to build SolidStart apps. | ||
</p> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Title } from '@solidjs/meta'; | ||
|
||
export default function Home() { | ||
return ( | ||
<main> | ||
<h1>ResponsiveImage for Solid</h1> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "bundler", | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"jsx": "preserve", | ||
"jsxImportSource": "solid-js", | ||
"allowJs": true, | ||
"strict": true, | ||
"noEmit": true, | ||
"types": ["vinxi/types/client"], | ||
"isolatedModules": true, | ||
"paths": { | ||
"~/*": ["./src/*"] | ||
} | ||
} | ||
} |
Oops, something went wrong.