Skip to content

Commit 278dcbc

Browse files
authored
feat: update resume starter to vite (#150)
Updated resume starter to use Vite instead of Vinxi. Ran locally to make sure it works. Checked checkbox functionality. <img width="1595" height="923" alt="resume" src="https://github.com/user-attachments/assets/95b860c8-33b3-41ca-aa39-a0bb1418809c" />
1 parent ac8c779 commit 278dcbc

File tree

11 files changed

+86
-102
lines changed

11 files changed

+86
-102
lines changed

examples/react-cra/resume-starter/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ dist
44
dist-ssr
55
*.local
66
.output
7-
.vinxi
87
.content-collections

examples/react-cra/resume-starter/app.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { defineConfig } from "@tanstack/react-start/config";
2-
import contentCollections from "@content-collections/vinxi";
1+
import { defineConfig } from "@tanstack/start/config";
2+
import contentCollections from "@content-collections/vite";
33
import viteTsConfigPaths from "vite-tsconfig-paths";
44
import tailwindcss from "@tailwindcss/vite";
55

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Resume Starter</title>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
<script type="module" src="/src/main.tsx"></script>
11+
</body>
12+
</html>

examples/react-cra/resume-starter/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"private": true,
44
"type": "module",
55
"scripts": {
6-
"dev": "vinxi dev",
7-
"start": "vinxi start",
8-
"build": "vinxi build",
6+
"dev": "vite",
7+
"start": "vite",
8+
"build": "vite build",
99
"serve": "vite preview",
1010
"test": "vitest run"
1111
},
@@ -29,12 +29,13 @@
2929
"tailwind-merge": "^3.0.2",
3030
"tailwindcss": "^4.0.6",
3131
"tailwindcss-animate": "^1.0.7",
32-
"vinxi": "^0.5.3",
3332
"vite-tsconfig-paths": "^5.1.4"
3433
},
3534
"devDependencies": {
3635
"@content-collections/core": "^0.8.2",
37-
"@content-collections/vinxi": "^0.1.0",
36+
"@content-collections/vite": "^0.2.6",
37+
"@tanstack/router-generator": "1.120.20",
38+
"@tanstack/start": "^1.120.20",
3839
"@testing-library/dom": "^10.4.0",
3940
"@testing-library/react": "^16.2.0",
4041
"@types/react": "^19.0.8",
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import ReactDOM from 'react-dom/client'
2+
import { RouterProvider } from '@tanstack/react-router'
3+
import { createRouter } from './router'
4+
5+
const router = createRouter()
6+
7+
const rootEl = document.getElementById('root')!
8+
ReactDOM.createRoot(rootEl).render(<RouterProvider router={router} />)

examples/react-cra/resume-starter/src/routeTree.gen.ts

Lines changed: 18 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -8,48 +8,25 @@
88
// You should NOT make any changes in this file as it will be overwritten.
99
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
1010

11-
// Import Routes
11+
import { Route as rootRouteImport } from './routes/__root'
12+
import { Route as IndexRouteImport } from './routes/index'
1213

13-
import { Route as rootRoute } from './routes/__root'
14-
import { Route as IndexImport } from './routes/index'
15-
16-
// Create/Update Routes
17-
18-
const IndexRoute = IndexImport.update({
14+
const IndexRoute = IndexRouteImport.update({
1915
id: '/',
2016
path: '/',
21-
getParentRoute: () => rootRoute,
17+
getParentRoute: () => rootRouteImport,
2218
} as any)
2319

24-
// Populate the FileRoutesByPath interface
25-
26-
declare module '@tanstack/react-router' {
27-
interface FileRoutesByPath {
28-
'/': {
29-
id: '/'
30-
path: '/'
31-
fullPath: '/'
32-
preLoaderRoute: typeof IndexImport
33-
parentRoute: typeof rootRoute
34-
}
35-
}
36-
}
37-
38-
// Create and export the route tree
39-
4020
export interface FileRoutesByFullPath {
4121
'/': typeof IndexRoute
4222
}
43-
4423
export interface FileRoutesByTo {
4524
'/': typeof IndexRoute
4625
}
47-
4826
export interface FileRoutesById {
49-
__root__: typeof rootRoute
27+
__root__: typeof rootRouteImport
5028
'/': typeof IndexRoute
5129
}
52-
5330
export interface FileRouteTypes {
5431
fileRoutesByFullPath: FileRoutesByFullPath
5532
fullPaths: '/'
@@ -58,31 +35,25 @@ export interface FileRouteTypes {
5835
id: '__root__' | '/'
5936
fileRoutesById: FileRoutesById
6037
}
61-
6238
export interface RootRouteChildren {
6339
IndexRoute: typeof IndexRoute
6440
}
6541

42+
declare module '@tanstack/react-router' {
43+
interface FileRoutesByPath {
44+
'/': {
45+
id: '/'
46+
path: '/'
47+
fullPath: '/'
48+
preLoaderRoute: typeof IndexRouteImport
49+
parentRoute: typeof rootRouteImport
50+
}
51+
}
52+
}
53+
6654
const rootRouteChildren: RootRouteChildren = {
6755
IndexRoute: IndexRoute,
6856
}
69-
70-
export const routeTree = rootRoute
57+
export const routeTree = rootRouteImport
7158
._addFileChildren(rootRouteChildren)
7259
._addFileTypes<FileRouteTypes>()
73-
74-
/* ROUTE_MANIFEST_START
75-
{
76-
"routes": {
77-
"__root__": {
78-
"filePath": "__root.tsx",
79-
"children": [
80-
"/"
81-
]
82-
},
83-
"/": {
84-
"filePath": "index.tsx"
85-
}
86-
}
87-
}
88-
ROUTE_MANIFEST_END */

examples/react-cra/resume-starter/src/routes/__root.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,10 @@ export const Route = createRootRoute({
4040

4141
function RootDocument({ children }: { children: React.ReactNode }) {
4242
return (
43-
<html lang="en">
44-
<head>
45-
<HeadContent />
46-
</head>
47-
<body>
48-
{children}
49-
<Scripts />
50-
</body>
51-
</html>
43+
<>
44+
<HeadContent />
45+
{children}
46+
<Scripts />
47+
</>
5248
);
5349
}

examples/react-cra/resume-starter/starter-info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"devDependencies": {
2424
"@content-collections/core": "^0.8.2",
25-
"@content-collections/vinxi": "^0.1.0"
25+
"@content-collections/vite": "^0.2.6"
2626
}
2727
},
2828
"dependsOn": ["start", "shadcn"],

examples/react-cra/resume-starter/starter.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323
},
2424
"devDependencies": {
2525
"@content-collections/core": "^0.8.2",
26-
"@content-collections/vinxi": "^0.1.0"
26+
"@content-collections/vite": "^0.2.6"
2727
}
2828
},
2929
"dependsOn": ["start", "shadcn"],
3030
"typescript": true,
3131
"tailwind": true,
3232
"files": {
33-
"./.gitignore": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n.output\n.vinxi\n.content-collections",
34-
"./app.config.ts": "import { defineConfig } from \"@tanstack/react-start/config\";\nimport contentCollections from \"@content-collections/vinxi\";\nimport viteTsConfigPaths from \"vite-tsconfig-paths\";\nimport tailwindcss from \"@tailwindcss/vite\";\n\nconst config = defineConfig({\n tsr: {\n appDirectory: \"src\",\n },\n vite: {\n plugins: [\n contentCollections(),\n viteTsConfigPaths({\n projects: [\"./tsconfig.json\"],\n }),\n tailwindcss(),\n ],\n },\n});\n\nexport default config;\n",
33+
"./.gitignore": "node_modules\n.DS_Store\ndist\ndist-ssr\n*.local\n.output\n.content-collections",
34+
"./app.config.ts": "import { defineConfig } from \"@tanstack/start/config\";\nimport contentCollections from \"@content-collections/vite\";\nimport viteTsConfigPaths from \"vite-tsconfig-paths\";\nimport tailwindcss from \"@tailwindcss/vite\";\n\nconst config = defineConfig({\n tsr: {\n appDirectory: \"src\",\n },\n vite: {\n plugins: [\n contentCollections(),\n viteTsConfigPaths({\n projects: [\"./tsconfig.json\"],\n }),\n tailwindcss(),\n ],\n },\n});\n\nexport default config;\n",
3535
"./content/education/code-school.md": "---\nschool: Code School\nsummary: Full Stack Development\nstartDate: 2020-01-01\nendDate: 2020-12-31\ntags:\n [\n \"Full Stack Development\",\n \"JavaScript\",\n \"React\",\n \"Node.js\",\n \"Express\",\n \"MongoDB\",\n ]\n---\n\nCompleted a comprehensive full stack development course covering JavaScript, React, Node.js, Express, and MongoDB. Gained hands-on experience with modern web development frameworks and databases while building a full stack application.\n",
3636
"./content/jobs/freelance.md": "---\njobTitle: Frontend Development Consultant\ncompany: Freelance\nlocation: Remote\nstartDate: 2020-01-01\nendDate: 2020-12-31\nsummary: Independent frontend development consultant working with multiple clients on web applications and sites\ndescription:\ntags:\n [\"React\", \"TypeScript\", \"Frontend Development\", \"JavaScript\", \"CSS\", \"HTML\"]\n---\n\nProvided expert frontend development services to various clients, specializing in React, TypeScript, and modern web technologies. Delivered responsive and performant web applications while maintaining high code quality and best practices.\n",
3737
"./content/jobs/initech-junior.md": "---\njobTitle: Junior Frontend Developer\ncompany: IniTech\nlocation: Remote\nstartDate: 2021-01-01\nendDate: 2021-12-31\nsummary: Junior frontend developer working on React-based web applications using modern development practices\ndescription:\ntags:\n [\n \"React\",\n \"TypeScript\",\n \"Frontend Development\",\n \"JavaScript\",\n \"TanStack\",\n \"Web Development\",\n ]\n---\n\nWorked as a junior frontend developer at IniTech, contributing to React-based web applications. Collaborated with the development team to implement responsive user interfaces, integrate REST APIs, and maintain code quality. Gained hands-on experience with modern frontend technologies and development workflows while working on production applications.\n",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig } from 'vite'
2+
import react from '@vitejs/plugin-react'
3+
import tsconfigPaths from 'vite-tsconfig-paths'
4+
import { tanstackRouter } from '@tanstack/router-plugin/vite'
5+
import contentCollections from '@content-collections/vite'
6+
import tailwindcss from '@tailwindcss/vite'
7+
8+
// https://vitejs.dev/config/
9+
export default defineConfig({
10+
plugins: [
11+
// Router plugin should come before react
12+
tanstackRouter(),
13+
react(),
14+
tsconfigPaths(),
15+
contentCollections(),
16+
tailwindcss(),
17+
],
18+
})

0 commit comments

Comments
 (0)