Skip to content

Commit 5b0004a

Browse files
authored
Merge pull request #11 from rschristian/refactor/migrate-to-vite
refactor: Migrate to Vite
2 parents fe33ffb + 8578d72 commit 5b0004a

Some content is hidden

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

41 files changed

+253
-14810
lines changed

.devcontainer/devcontainer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@
1212
"customizations": {
1313
"codespaces": {
1414
"openFiles": [
15-
"src/index.js",
16-
"src/routes/home/index.js"
15+
"src/index.jsx"
1716
]
1817
}
1918
},
2019
"portsAttributes": {
21-
"8080": {
20+
"5173": {
2221
"label": "Application",
2322
"onAutoForward": "openPreview"
2423
}
2524
},
26-
"forwardPorts": [8080]
25+
"forwardPorts": [5173]
2726
}

.gitignore

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
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+
110
node_modules
2-
/build
3-
/*.log
11+
dist
12+
dist-ssr
13+
*.local
14+
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: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,16 @@ Everything you do here is contained within this one codespace. There is no repos
1010

1111
## CLI Commands
1212

13-
``` bash
14-
# install dependencies
13+
```bash
14+
# Install dependencies
1515
npm install
1616

17-
# serve with hot reload at localhost:8080
17+
# Start a development server at localhost:5173
1818
npm run dev
1919

20-
# build for production with minification
20+
# Create a production build
2121
npm run build
2222

23-
# test the production build locally
24-
npm run serve
25-
26-
# run tests with jest and enzyme
27-
npm run test
23+
# Preview your production build locally at localhost:5173
24+
npm run preview
2825
```
29-
30-
For detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md).

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<meta name="color-scheme" content="light dark" />
8+
<title>Vite + Preact</title>
9+
</head>
10+
<body>
11+
<div id="app"></div>
12+
<script type="module" src="/src/index.jsx"></script>
13+
</body>
14+
</html>

jsconfig.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"module": "ESNext",
5+
"moduleResolution": "bundler",
6+
"noEmit": true,
7+
"allowJs": true,
8+
"checkJs": true,
9+
"jsx": "react-jsx",
10+
"jsxImportSource": "preact"
11+
},
12+
"include": ["node_modules/vite/client.d.ts", "**/*"]
13+
}

0 commit comments

Comments
 (0)