feat(create-turbo): create kitchen-sink
This commit is contained in:
commit
4625c93980
80 changed files with 11572 additions and 0 deletions
5
apps/blog/.gitignore
vendored
Normal file
5
apps/blog/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
node_modules
|
||||
|
||||
/build
|
||||
.env
|
||||
.vercel
|
||||
38
apps/blog/README.md
Normal file
38
apps/blog/README.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Remix
|
||||
|
||||
This directory is a brief example of a [Remix](https://remix.run/docs) site that can be deployed to Vercel with zero configuration.
|
||||
|
||||
To get started, run the Remix cli with this template
|
||||
|
||||
```sh
|
||||
npx create-remix@latest --template vercel/vercel/examples/remix
|
||||
```
|
||||
|
||||
## Deploy Your Own
|
||||
|
||||
[](https://vercel.com/new/clone?repository-url=https://github.com/vercel/vercel/tree/main/examples/remix&template=remix)
|
||||
|
||||
_Live Example: https://remix-run-template.vercel.app_
|
||||
|
||||
You can also deploy using the [Vercel CLI](https://vercel.com/docs/cli):
|
||||
|
||||
```sh
|
||||
npm i -g vercel
|
||||
vercel
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
To run your Remix app locally, make sure your project's local dependencies are installed:
|
||||
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
Afterwards, start the Remix development server like so:
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Open up [http://localhost:5173](http://localhost:5173) and you should be ready to go!
|
||||
32
apps/blog/app/root.tsx
Normal file
32
apps/blog/app/root.tsx
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import {
|
||||
Links,
|
||||
Meta,
|
||||
Outlet,
|
||||
Scripts,
|
||||
ScrollRestoration,
|
||||
} from "@remix-run/react";
|
||||
import { Analytics } from "@vercel/analytics/react";
|
||||
import "./styles.css";
|
||||
|
||||
export function Layout({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charSet="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<Meta />
|
||||
<Links />
|
||||
</head>
|
||||
<body>
|
||||
{children}
|
||||
<ScrollRestoration />
|
||||
<Scripts />
|
||||
<Analytics />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
export default function App() {
|
||||
return <Outlet />;
|
||||
}
|
||||
19
apps/blog/app/routes/_index.tsx
Normal file
19
apps/blog/app/routes/_index.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { CounterButton } from "@repo/ui/counter-button";
|
||||
import { Link } from "@repo/ui/link";
|
||||
|
||||
export default function Index() {
|
||||
return (
|
||||
<div className="container">
|
||||
<h1 className="title">
|
||||
Blog <br />
|
||||
<span>Kitchen Sink</span>
|
||||
</h1>
|
||||
<CounterButton />
|
||||
<p className="description">
|
||||
Built With <Link href="https://turborepo.com">Turborepo</Link>
|
||||
{" & "}
|
||||
<Link href="https://remix.run/">Remix</Link>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
15
apps/blog/app/routes/edge.tsx
Normal file
15
apps/blog/app/routes/edge.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import type { MetaFunction } from "@vercel/remix";
|
||||
|
||||
export const config = { runtime: "edge" };
|
||||
|
||||
export const meta: MetaFunction = () => [
|
||||
{ title: "Remix@Edge | New Remix App" },
|
||||
];
|
||||
|
||||
export default function Edge() {
|
||||
return (
|
||||
<div style={{ fontFamily: "system-ui, sans-serif", lineHeight: "1.4" }}>
|
||||
<h1>Welcome to Remix@Edge</h1>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
55
apps/blog/app/styles.css
Normal file
55
apps/blog/app/styles.css
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
html {
|
||||
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
||||
Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
line-height: 1.5;
|
||||
tab-size: 4;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 1.5rem;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 0 16px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 3rem;
|
||||
font-weight: 700;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.title span {
|
||||
display: inline-block;
|
||||
background-image: linear-gradient(to right, #3b82f6, #ef4444);
|
||||
-webkit-background-clip: text;
|
||||
background-clip: text;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
.description {
|
||||
color: #9ca3af;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.description a {
|
||||
color: #3b82f6;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.description a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
4
apps/blog/eslint.config.js
Normal file
4
apps/blog/eslint.config.js
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { config } from "@repo/eslint-config/react";
|
||||
|
||||
/** @type {import("eslint").Linter.Config} */
|
||||
export default config;
|
||||
40
apps/blog/package.json
Normal file
40
apps/blog/package.json
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "blog",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "remix vite:build",
|
||||
"dev": "remix vite:dev",
|
||||
"check-types": "tsc --noEmit",
|
||||
"lint": "eslint app/ --max-warnings 0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@remix-run/node": "^2.15.2",
|
||||
"@remix-run/react": "^2.15.2",
|
||||
"@remix-run/server-runtime": "^2.15.2",
|
||||
"@repo/ui": "workspace:*",
|
||||
"@vercel/analytics": "^1.5.0",
|
||||
"@vercel/remix": "2.16.6",
|
||||
"isbot": "^5.1.23",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@remix-run/dev": "^2.15.2",
|
||||
"@repo/eslint-config": "workspace:*",
|
||||
"@types/react": "^18.3.18",
|
||||
"@types/react-dom": "^18.3.5",
|
||||
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
||||
"@typescript-eslint/parser": "^8.34.0",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.29.0",
|
||||
"typescript": "5.8.2",
|
||||
"vite": "^5.4.14",
|
||||
"vite-tsconfig-paths": "4.2.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
}
|
||||
}
|
||||
BIN
apps/blog/public/favicon.ico
Normal file
BIN
apps/blog/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
25
apps/blog/tsconfig.json
Normal file
25
apps/blog/tsconfig.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"include": ["**/*.ts", "**/*.tsx"],
|
||||
"compilerOptions": {
|
||||
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
||||
"types": ["@vercel/remix", "vite/client"],
|
||||
"isolatedModules": true,
|
||||
"esModuleInterop": true,
|
||||
"jsx": "react-jsx",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"resolveJsonModule": true,
|
||||
"target": "ES2022",
|
||||
"strict": true,
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": ["./app/*"]
|
||||
},
|
||||
|
||||
// Vite takes care of building everything, not tsc.
|
||||
"noEmit": true
|
||||
}
|
||||
}
|
||||
11
apps/blog/vite.config.ts
Normal file
11
apps/blog/vite.config.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import { vitePlugin as remix } from "@remix-run/dev";
|
||||
import { installGlobals } from "@remix-run/node";
|
||||
import { defineConfig } from "vite";
|
||||
import { vercelPreset } from "@vercel/remix/vite";
|
||||
import tsconfigPaths from "vite-tsconfig-paths";
|
||||
|
||||
installGlobals();
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [remix({ presets: [vercelPreset()] }), tsconfigPaths()],
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue