@justinli/create-vite-template 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/index.js +16 -0
- package/package.json +16 -0
- package/template/.editorconfig +12 -0
- package/template/.oxfmtrc.json +4 -0
- package/template/.oxlintrc.json +6 -0
- package/template/README.md +10 -0
- package/template/index.html +13 -0
- package/template/package.json +34 -0
- package/template/pnpm-lock.yaml +1380 -0
- package/template/public/favicon.svg +1 -0
- package/template/src/App.css +7 -0
- package/template/src/App.tsx +12 -0
- package/template/src/index.css +36 -0
- package/template/src/main.tsx +10 -0
- package/template/tsconfig.app.json +28 -0
- package/template/tsconfig.json +4 -0
- package/template/tsconfig.node.json +26 -0
- package/template/vite.config.ts +7 -0
package/README.md
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { cpSync, existsSync } from "node:fs";
|
|
3
|
+
import { resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const target = process.argv[2] ?? "my-app";
|
|
7
|
+
const from = fileURLToPath(new URL("./template", import.meta.url));
|
|
8
|
+
const to = resolve(process.cwd(), target);
|
|
9
|
+
|
|
10
|
+
if (existsSync(to)) {
|
|
11
|
+
console.error(`Target already exists: ${to}`);
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
cpSync(from, to, { recursive: true });
|
|
16
|
+
console.log(`Created ${target}`);
|
package/package.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@justinli/create-vite-template",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"create-vite-template": "index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": ["index.js", "template"],
|
|
10
|
+
"publishConfig": { "access": "public" },
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/justinli34/create-vite-template.git"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -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="/favicon.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Vite Template</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "vite-template",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"preview": "vite preview",
|
|
10
|
+
"lint": "oxlint",
|
|
11
|
+
"lint:fix": "oxlint --fix",
|
|
12
|
+
"fmt": "oxfmt",
|
|
13
|
+
"fmt:check": "oxfmt --check"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"react": "^19.2.0",
|
|
17
|
+
"react-dom": "^19.2.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/node": "^24.10.1",
|
|
21
|
+
"@types/react": "^19.2.7",
|
|
22
|
+
"@types/react-dom": "^19.2.3",
|
|
23
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
24
|
+
"oxfmt": "^0.33.0",
|
|
25
|
+
"oxlint": "^1.48.0",
|
|
26
|
+
"typescript": "~5.9.3",
|
|
27
|
+
"vite": "^8.0.0-beta.13"
|
|
28
|
+
},
|
|
29
|
+
"pnpm": {
|
|
30
|
+
"overrides": {
|
|
31
|
+
"vite": "^8.0.0-beta.13"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|