Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/playgrounds/bun-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"@types/react": "19.2.6",
"@types/react-dom": "19.2.3",
"@types/bun": "1.3.2"
}
},
"packageManager": "bun@1.3.2"
}
3 changes: 3 additions & 0 deletions apps/playgrounds/bun-solid-start/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VITE_TEST=Hello from SolidStart (Production)
VITE_NUMERIC=3
VITE_BOOLEAN=false
28 changes: 28 additions & 0 deletions apps/playgrounds/bun-solid-start/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
dist
.wrangler
.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
32 changes: 32 additions & 0 deletions apps/playgrounds/bun-solid-start/README.md
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, `bun run build` will generate a Node app that you can run with `bun start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.ts`.

## This project was created with the [Solid CLI](https://github.com/solidjs-community/solid-cli)
15 changes: 15 additions & 0 deletions apps/playgrounds/bun-solid-start/app.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import arkenvVitePlugin from "@arkenv/vite-plugin";
import { defineConfig } from "@solidjs/start/config";
import { type } from "arkenv";

export const Env = type({
VITE_TEST: "string",
VITE_NUMERIC: "string.numeric",
VITE_BOOLEAN: "boolean",
});

export default defineConfig({
vite: {
plugins: [arkenvVitePlugin(Env)],
},
});
1,236 changes: 1,236 additions & 0 deletions apps/playgrounds/bun-solid-start/bun.lock

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions apps/playgrounds/bun-solid-start/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "bun-solid-start-playground",
"private": true,
"type": "module",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start"
},
"dependencies": {
"@arkenv/vite-plugin": "^0.0.18",
"@solidjs/start": "^1.1.0",
"arkenv": "^0.7.6",
"arktype": "2.1.27",
"solid-js": "^1.9.5",
"vinxi": "^0.5.7"
},
"packageManager": "bun@1.3.2"
}
Binary file added apps/playgrounds/bun-solid-start/public/favicon.ico
Binary file not shown.
63 changes: 63 additions & 0 deletions apps/playgrounds/bun-solid-start/src/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
body {
font-family:
Gordita, Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue",
sans-serif;
}

a {
margin-right: 1rem;
}

main {
text-align: center;
padding: 1em;
margin: 0 auto;
}

h1 {
color: #335d92;
text-transform: uppercase;
font-size: 4rem;
font-weight: 100;
line-height: 1.1;
margin: 4rem auto;
max-width: 14rem;
}

p {
max-width: 14rem;
margin: 2rem auto;
line-height: 1.35;
}

@media (min-width: 480px) {
h1 {
max-width: none;
}

p {
max-width: none;
}
}

.increment {
font-family: inherit;
font-size: inherit;
padding: 1em 2em;
color: #335d92;
background-color: rgba(68, 107, 158, 0.1);
border-radius: 2em;
border: 2px solid rgba(68, 107, 158, 0);
outline: none;
width: 200px;
font-variant-numeric: tabular-nums;
cursor: pointer;
}

.increment:focus {
border: 2px solid #335d92;
}

.increment:active {
background-color: rgba(68, 107, 158, 0.2);
}
42 changes: 42 additions & 0 deletions apps/playgrounds/bun-solid-start/src/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { createSignal } from "solid-js";
import "./app.css";

export default function App() {
const [count, setCount] = createSignal(0);

return (
<main>
<h1>Hello world!</h1>
<button
class="increment"
onClick={() => setCount(count() + 1)}
type="button"
>
Clicks: {count()}
</button>
<p>
Visit{" "}
<a
href="https://start.solidjs.com"
target="_blank"
rel="noopener noreferrer"
>
start.solidjs.com
</a>{" "}
to learn how to build SolidStart apps.
<br />
<br />
<code>import.meta.env.VITE_TEST</code>: {import.meta.env.VITE_TEST} (of
type {typeof import.meta.env.VITE_TEST})
<br />
<code>import.meta.env.VITE_NUMERIC</code>:{" "}
{import.meta.env.VITE_NUMERIC} (of type{" "}
{typeof import.meta.env.VITE_NUMERIC})
<br />
<code>import.meta.env.VITE_BOOLEAN</code>:{" "}
{import.meta.env.VITE_BOOLEAN} (of type{" "}
{typeof import.meta.env.VITE_BOOLEAN})
</p>
</main>
);
}
4 changes: 4 additions & 0 deletions apps/playgrounds/bun-solid-start/src/entry-client.tsx
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")!);
21 changes: 21 additions & 0 deletions apps/playgrounds/bun-solid-start/src/entry-server.tsx
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>
)}
/>
));
10 changes: 10 additions & 0 deletions apps/playgrounds/bun-solid-start/src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// <reference types="@solidjs/start/env" />

type ImportMetaEnvAugmented =
import("@arkenv/vite-plugin").ImportMetaEnvAugmented<
typeof import("../app.config").Env
>;

// Augment import.meta.env with your schema
// Only `VITE_*` prefixed variables will be included
interface ImportMetaEnv extends ImportMetaEnvAugmented {}
19 changes: 19 additions & 0 deletions apps/playgrounds/bun-solid-start/tsconfig.json
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/*"]
}
}
}
3 changes: 2 additions & 1 deletion apps/playgrounds/bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"devDependencies": {
"@types/bun": "1.3.2",
"typescript": "5.9.3"
}
},
"packageManager": "bun@1.3.2"
}
4 changes: 4 additions & 0 deletions arkenv.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
"path": "apps/playgrounds/solid-start",
"name": " solid-start-playground"
},
{
"path": "apps/playgrounds/bun-solid-start",
"name": " bun-solid-start-playground"
},
{
"path": "apps/www",
"name": " www (arkenv.js.org)"
Expand Down
21 changes: 21 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading