@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 ADDED
@@ -0,0 +1,14 @@
1
+ # Create Vite Template
2
+
3
+ This template provides a minimal setup for a static site using:
4
+ - React
5
+ - TypeScript
6
+ - Vite
7
+ - Oxlint
8
+ - Oxfmt
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ pnpm create @justinli/vite-template my-app
14
+ ```
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,12 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 2
10
+
11
+ [*.md]
12
+ trim_trailing_whitespace = false
@@ -0,0 +1,4 @@
1
+ {
2
+ "$schema": "./node_modules/oxfmt/configuration_schema.json",
3
+ "printWidth": 120
4
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
3
+ "categories": {
4
+ "correctness": "error"
5
+ }
6
+ }
@@ -0,0 +1,10 @@
1
+ # React + TypeScript + Vite 8
2
+
3
+ This template provides a minimal setup to get React working in Vite with Oxlint and Oxfmt.
4
+
5
+ ## Getting Started
6
+
7
+ ```
8
+ pnpm install
9
+ pnpm dev
10
+ ```
@@ -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
+ }