Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remix-example #58

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
50 changes: 50 additions & 0 deletions examples/remix-example/app/root.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import {
Form,
Links,
Meta,
Scripts,
ScrollRestoration,
} from '@remix-run/react'

export default function App() {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1"
/>
<Meta />
<Links />
</head>
<body>
<div id="sidebar">
<h1>Remix Contacts</h1>
<div>
<Form id="search-form" role="search">
<input
aria-label="Search contacts"
id="q"
name="q"
placeholder="Search"
type="search"
/>
<div
aria-hidden
hidden={true}
id="search-spinner"
/>
</Form>
<Form method="post">
<button type="submit">New</button>
</Form>
</div>
</div>

<ScrollRestoration />
<Scripts />
</body>
</html>
)
}
29 changes: 29 additions & 0 deletions examples/remix-example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "remix-example",
"private": true,
"scripts": {
"build": "remix vite:build",
"dev": "remix vite:dev",
"start": "remix-serve ./build/server/index.js"
},
"type": "module",
"dependencies": {
"@remix-run/node": "^2.11.1",
"@remix-run/react": "^2.11.1",
"@remix-run/serve": "^2.11.1",
"@stylexjs/open-props": "^0.6.0",
"@stylexjs/stylex": "^0.6.0",
"isbot": "^4.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@remix-run/dev": "^2.11.1",
"@types/react": "^18.2.79",
"@types/react-dom": "^18.2.25",
"typescript": "^5.5.4",
"unplugin-stylex": "workspace:*",
"vite": "5.1.0",
"vite-tsconfig-paths": "^5.0.1"
}
}
20 changes: 20 additions & 0 deletions examples/remix-example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ES2020",
"lib": ["DOM", "ES2020"],
"module": "ESNext",
"jsx": "react-jsx",
"strict": true,
"skipLibCheck": true,
"isolatedModules": true,
"resolveJsonModule": true,
"moduleResolution": "bundler",
"useDefineForClassFields": true,
"baseUrl": "./",
"paths": {
"~/*": ["app/*"]
}
},
"include": ["app"],
"exclude": ["node_modules"]
}
17 changes: 17 additions & 0 deletions examples/remix-example/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { vitePlugin as remix } from '@remix-run/dev'
import stylexVitePlugin from 'unplugin-stylex/vite'
import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
build: {
outDir: 'dist'
},
plugins: [
remix(),
stylexVitePlugin({
dev: true,
}),
tsconfigPaths(),
],
})
4 changes: 0 additions & 4 deletions examples/vue-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@
"dependencies": {
"@stylexjs/open-props": "^0.6.0",
"@stylexjs/stylex": "^0.6.0",
"esbuild-example": "workspace:^",
"rollup-example": "^1.0.0",
"rspack-example": "workspace:^",
"vite-example": "^1.0.39",
"vue": "^3.4.23"
},
"devDependencies": {
Expand Down
Loading
Loading