Skip to content

Commit 476a5f7

Browse files
committed
Convert to framework-agnostic router based on @remix-run/fetch-router
1 parent 4fe304f commit 476a5f7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+5519
-2061
lines changed

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
.DS_Store
2-
node_modules
3-
dist
4-
types
2+
3+
dist/
4+
node_modules/
5+
6+
.claude/settings.local.json
7+
.env

.vscode/extensions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"biomejs.biome",
4+
"github.vscode-github-actions",
5+
"GitHub.vscode-pull-request-github",
6+
"hverlin.mise-vscode",
7+
"tamasfe.even-better-toml",
8+
"wayou.vscode-todo-highlight",
9+
"redhat.vscode-yaml"
10+
]
11+
}

.vscode/settings.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"typescript.preferences.importModuleSpecifierEnding": "js",
3+
"biome.enabled": true,
4+
5+
"prettier.enable": false,
6+
"dprint.experimentalLsp": false,
7+
"deno.enable": false,
8+
9+
"editor.codeActionsOnSave": {
10+
"source.fixAll.ts": "explicit"
11+
},
12+
13+
"editor.defaultFormatter": "biomejs.biome",
14+
"editor.formatOnSave": true,
15+
16+
"[typescript]": {
17+
"editor.defaultFormatter": "biomejs.biome"
18+
},
19+
"[tsx]": {
20+
"editor.defaultFormatter": "biomejs.biome"
21+
},
22+
"[json]": {
23+
"editor.defaultFormatter": "biomejs.biome"
24+
},
25+
"[jsonc]": {
26+
"editor.defaultFormatter": "biomejs.biome"
27+
},
28+
"[css]": {
29+
"editor.defaultFormatter": "biomejs.biome"
30+
},
31+
32+
"explorer.fileNesting.enabled": true,
33+
"explorer.fileNesting.expand": false,
34+
"explorer.fileNesting.patterns": {
35+
"*.css": "$(capture).css.map, $(capture).*.css",
36+
".env": "*.env, .env.*, .envrc, env.d.ts",
37+
"package.json": ".github*, .npmrc, .vscode*, biome.json*, eslint.config.*, mise.toml, pnpm-*.yaml, prettier.config.*, tsconfig.*, wrangler.toml, wrangler.json*, workspace.json",
38+
"readme*": "agent*, authors, backers*, changelog*, citation*, claude*, code_of_conduct*, codeowners, contributing*, contributors, copying, credits, docs.md, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors*",
39+
"vite.config.*": "vitest.config.*, nitro.config.*, *.plugin.ts"
40+
},
41+
"files.exclude": {
42+
"**/.claude": true,
43+
"**/dist": true,
44+
},
45+
46+
"todohighlight.keywords": [
47+
"MARK:",
48+
{
49+
"text": "FIXME:",
50+
"backgroundColor": "#F14848"
51+
},
52+
{
53+
"text": "TODO:",
54+
"backgroundColor": "#3593FF"
55+
}
56+
],
57+
"todohighlight.defaultStyle": {
58+
"backgroundColor": "#434B54",
59+
"color": "#fff",
60+
"borderRadius": "2px"
61+
}
62+
}

README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

biome.jsonc

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.0/schema.json",
3+
"root": true,
4+
"vcs": {
5+
"enabled": true,
6+
"clientKind": "git",
7+
"useIgnoreFile": true
8+
},
9+
"formatter": {
10+
"enabled": true,
11+
"indentStyle": "space",
12+
"indentWidth": 4,
13+
"lineWidth": 100
14+
},
15+
"javascript": {
16+
"formatter": {
17+
"arrowParentheses": "asNeeded",
18+
"semicolons": "always",
19+
"quoteStyle": "double"
20+
}
21+
},
22+
"css": {
23+
"formatter": {
24+
"quoteStyle": "double"
25+
}
26+
},
27+
"linter": {
28+
"enabled": false,
29+
"rules": {
30+
"recommended": true,
31+
"correctness": {
32+
"noUnusedImports": "warn",
33+
"noUnusedFunctionParameters": "warn",
34+
"noUnusedPrivateClassMembers": "warn",
35+
"useExhaustiveDependencies": "warn",
36+
"useHookAtTopLevel": "error",
37+
"noEmptyPattern": "warn",
38+
"noUnknownPseudoClass": "error",
39+
"noUnknownPseudoElement": "error",
40+
"noUnknownTypeSelector": "error",
41+
"useImportExtensions": "error"
42+
},
43+
"suspicious": {
44+
"noEmptyInterface": "warn",
45+
"noExplicitAny": "warn",
46+
"noDocumentCookie": "error",
47+
"noDuplicateCustomProperties": "error",
48+
"noDuplicateElseIf": "error",
49+
"noDuplicateProperties": "error",
50+
"noIrregularWhitespace": "error",
51+
"noTemplateCurlyInString": "warn",
52+
"noArrayIndexKey": "off",
53+
"noAssignInExpressions": "off"
54+
},
55+
"complexity": {
56+
"noBannedTypes": "warn",
57+
"noUselessEscapeInRegex": "warn",
58+
"noUselessStringRaw": "warn"
59+
},
60+
"a11y": {
61+
"noAutofocus": "off"
62+
},
63+
"performance": {
64+
"noBarrelFile": "off",
65+
"useTopLevelRegex": "warn"
66+
},
67+
"style": {
68+
"noNamespace": "off",
69+
"noNonNullAssertion": "off",
70+
"useFragmentSyntax": "warn",
71+
"useImportType": "error",
72+
"useNodejsImportProtocol": "error",
73+
"useConsistentArrayType": {
74+
"level": "warn",
75+
"options": { "syntax": "shorthand" }
76+
},
77+
"noParameterAssign": "error",
78+
"useAsConstAssertion": "error",
79+
"useDefaultParameterLast": "error",
80+
"useEnumInitializers": "error",
81+
"useSelfClosingElements": "error",
82+
"useConst": "error",
83+
"useSingleVarDeclarator": "error",
84+
"noUnusedTemplateLiteral": "error",
85+
"useNumberNamespace": "error",
86+
"noInferrableTypes": "error",
87+
"noUselessElse": "error",
88+
"noCommonJs": "warn",
89+
"noEnum": "error",
90+
"noSubstr": "warn",
91+
"useAtIndex": "warn",
92+
"useCollapsedIf": "warn",
93+
"useConsistentMemberAccessibility": {
94+
"level": "error",
95+
"options": {
96+
"accessibility": "none"
97+
}
98+
},
99+
"useTrimStartEnd": "error"
100+
}
101+
}
102+
},
103+
"assist": {
104+
"actions": {
105+
"source": {
106+
"useSortedAttributes": "on",
107+
"organizeImports": "on"
108+
}
109+
}
110+
},
111+
"overrides": [
112+
{
113+
"includes": ["**/.vscode/**"],
114+
"json": {
115+
"parser": {
116+
"allowComments": true,
117+
"allowTrailingCommas": true
118+
}
119+
}
120+
},
121+
{
122+
"includes": ["**/dist/**"],
123+
"linter": { "enabled": false },
124+
"formatter": { "enabled": false },
125+
"assist": { "enabled": false }
126+
}
127+
]
128+
}

examples/blog/.vscode

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/Users/orion/Developer/Libraries/webstd-ui/router/.vscode

examples/blog/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + Remix</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.tsx"></script>
12+
</body>
13+
</html>

examples/blog/mise.toml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[tools]
2+
node = "lts"
3+
pnpm = "latest"
4+
5+
[env]
6+
_.path = ['{{config_root}}/node_modules/.bin']
7+
8+
[tasks.install]
9+
description = "Install dependencies"
10+
sources = ["package.json"]
11+
run = "pnpm install"
12+
13+
[tasks.dev]
14+
description = "Run the development server"
15+
depends = [":install"]
16+
run = "vite dev --host"
17+
18+
[tasks.build]
19+
description = "Build the app"
20+
depends = [":install", "//packages/remix-client-router:build"]
21+
sources = [
22+
"../../pnpm-lock.yaml",
23+
"vite.config.ts",
24+
"tsconfig.json",
25+
"app/**/*.{ts,tsx,css}",
26+
]
27+
outputs = ["dist"]
28+
run = "vite build"
29+
30+
[tasks.preview]
31+
description = "Preview the built application"
32+
depends = ":build"
33+
run = "vite preview"
34+
35+
[tasks.fmt]
36+
description = "Format the entire project"
37+
run = "biome format --write ."
38+
39+
[tasks.lint]
40+
description = "Lint the entire project"
41+
run = "biome lint --write --unsafe --assist-enabled=true ."
42+
43+
[tasks.fix]
44+
description = "Format and lint the entire project"
45+
depends = [":fmt", ":lint"]
46+
47+
[tasks.typecheck]
48+
description = "Typecheck the entire project"
49+
run = "tsgo --noEmit"
50+

examples/blog/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "remix-blog",
3+
"private": true,
4+
"type": "module",
5+
"dependencies": {
6+
"@remix-run/dom": "catalog:remix",
7+
"@remix-run/events": "catalog:remix",
8+
"@remix-run/fetch-router": "catalog:remix",
9+
"@remix-run/style": "catalog:remix",
10+
"@webstd-ui/router": "workspace:*"
11+
},
12+
"devDependencies": {
13+
"@biomejs/biome": "catalog:tools",
14+
"@typescript/native-preview": "catalog:tools",
15+
"vite": "catalog:dev"
16+
}
17+
}

examples/blog/public/favicon.ico

16.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)