Skip to content

Commit 8457635

Browse files
committed
feat: migrate from react-router to vite build workflow (react-router does not work well with gh pages basename)
1 parent aa1856c commit 8457635

Some content is hidden

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

44 files changed

+538
-2715
lines changed

.dockerignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
.react-router
2-
build
1+
dist
32
node_modules
4-
README.md

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Upload artifact
5454
uses: actions/upload-pages-artifact@v4
5555
with:
56-
path: './build/client'
56+
path: './dist'
5757

5858
- name: Deploy to GitHub Pages
5959
id: deployment

.gitignore

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
1-
.DS_Store
2-
.env
3-
/node_modules/
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
414

5-
# React Router
6-
/.react-router/
7-
/build/
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ npm run build
8282
> Test it with:
8383
>
8484
> ```sh
85-
> npx http-server build/client
85+
> npx http-server dist
8686
> ```
8787
8888
> [!NOTE]
8989
>
90-
> If you're familiar with deploying Node applications, the built-in app server is production-ready. Deploy the `build` folder.
90+
> If you're familiar with deploying Node applications, the built-in app server is production-ready. Deploy the `dist` folder.
9191
9292
### 🐳 Docker Deployment
9393

app/root.tsx

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

app/routes.ts

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

components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"tsx": true,
66
"tailwind": {
77
"config": "",
8-
"css": "app/app.css",
8+
"css": "src/index.css",
99
"baseColor": "neutral",
1010
"cssVariables": true,
1111
"prefix": ""

eslint.config.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,26 @@ import globals from 'globals';
33
import reactHooks from 'eslint-plugin-react-hooks';
44
import reactRefresh from 'eslint-plugin-react-refresh';
55
import tseslint from 'typescript-eslint';
6+
import { defineConfig, globalIgnores } from 'eslint/config';
67

7-
export default tseslint.config(
8-
{ ignores: ['dist', 'archives', 'scripts', '.react-router', 'build', 'node_modules', 'public/js', 'misc'] },
9-
js.configs.recommended,
10-
tseslint.configs.recommended,
8+
export default defineConfig([
9+
globalIgnores(['dist']),
1110
{
12-
// extends: [js.configs.recommended, ...tseslint.configs.recommended],
13-
files: ['**/*.{ts,tsx,js,jsx}'],
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs['recommended-latest'],
16+
reactRefresh.configs.vite,
17+
],
1418
languageOptions: {
1519
ecmaVersion: 2020,
1620
globals: globals.browser,
1721
},
18-
plugins: {
19-
'react-hooks': reactHooks,
20-
'react-refresh': reactRefresh,
21-
},
2222
rules: {
2323
...reactHooks.configs.recommended.rules,
24-
'@typescript-eslint/no-unused-vars': ['warn'],
2524
'@typescript-eslint/no-explicit-any': ['off'],
26-
'react-hooks/exhaustive-deps': ['off'],
25+
'react-refresh/only-export-components': ['warn'],
2726
},
28-
}
29-
);
27+
},
28+
]);

index.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/mcp.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>MCP Registry</title>
8+
<meta name="description" content="Explore MCP servers" />
9+
<meta property="og:title" content="MCP Registry UI" />
10+
<meta property="og:description" content="Explore MCP servers" />
11+
<meta property="og:type" content="website" />
12+
<meta property="og:site_name" content="MCP Registry" />
13+
<script type="application/ld+json">
14+
{
15+
"@context": "https://schema.org",
16+
"@type": "WebSite",
17+
"name": "MCP Registry UI",
18+
"description": "Explore MCP servers - Unofficial web UI to explore the official registry for Model Context Protocol (MCP) servers",
19+
"url": "https://yourdomain.com",
20+
"potentialAction": {
21+
"@type": "SearchAction",
22+
"target": "https://vemonet.github.io/mcp-registry?search={search_term_string}",
23+
"query-input": "required name=search_term_string"
24+
}
25+
}
26+
</script>
27+
</head>
28+
<body>
29+
<div id="root"></div>
30+
<script type="module" src="/src/main.tsx"></script>
31+
</body>
32+
</html>

0 commit comments

Comments
 (0)