@m4vi/create-vrt-tmp 1.0.0
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 +20 -0
- package/index.js +1 -0
- package/package.json +31 -0
- package/template/README.md +1 -0
- package/template/eslint.config.js +29 -0
- package/template/index.html +14 -0
- package/template/package-lock.json +3422 -0
- package/template/package.json +31 -0
- package/template/public/vite.svg +1 -0
- package/template/src/App.jsx +25 -0
- package/template/src/assets/react.svg +1 -0
- package/template/src/assets/tailwindcss.svg +1 -0
- package/template/src/index.css +1 -0
- package/template/src/main.jsx +10 -0
- package/template/vite.config.js +8 -0
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# create-vrt-tmp
|
|
2
|
+
|
|
3
|
+
Vite, React, and Tailwind CSS --template
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm create vrt-tmp@latest my-app
|
|
9
|
+
cd my-app
|
|
10
|
+
npm run dev
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
|
|
15
|
+
- Node.js 14.18+ or 16+
|
|
16
|
+
- npm or yarn
|
|
17
|
+
|
|
18
|
+
## License
|
|
19
|
+
|
|
20
|
+
MIT
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import fs from"fs";import path from"path";import{fileURLToPath}from"url";import{execSync}from"child_process";const __filename=fileURLToPath(import.meta.url),__dirname=path.dirname(__filename),projectName=process.argv[2]||"vrt-app",targetDir=path.join(process.cwd(),projectName);if(fs.existsSync(targetDir)){console.error(`Directory ${projectName} already exists`);process.exit(1)}const templateDir=path.join(__dirname,"template");fs.mkdirSync(targetDir,{recursive:!0});function copyDir(src,dest){fs.mkdirSync(dest,{recursive:!0});const files=fs.readdirSync(src);files.forEach((file)=>{const srcPath=path.join(src,file),destPath=path.join(dest,file);fs.statSync(srcPath).isDirectory()?copyDir(srcPath,destPath):fs.copyFileSync(srcPath,destPath)})}copyDir(templateDir,targetDir);process.chdir(targetDir);console.log(`\nCreating project in ${targetDir}\n`);try{console.log("Installing dependencies...\n");execSync("npm install",{stdio:"inherit"});console.log(`\nProject created successfully!\n`);console.log(`To start developing:\n`);console.log(` cd ${projectName}`);console.log(` npm run dev\n`)}catch(error){console.error("Failed to install dependencies",error);process.exit(1)}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@m4vi/create-vrt-tmp",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Vite, React, and Tailwind CSS --template",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "m4vi"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"create-vrt-tmp": "./index.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"index.js",
|
|
15
|
+
"template"
|
|
16
|
+
],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": "^14.18.0 || >=16.0.0"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/igmansvi/vrt-tmp.git"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"vite",
|
|
26
|
+
"react",
|
|
27
|
+
"tailwindcss",
|
|
28
|
+
"template",
|
|
29
|
+
"create"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# React + Vite + Tailwindcss --template
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
+
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
6
|
+
|
|
7
|
+
export default defineConfig([
|
|
8
|
+
globalIgnores(['dist']),
|
|
9
|
+
{
|
|
10
|
+
files: ['**/*.{js,jsx}'],
|
|
11
|
+
extends: [
|
|
12
|
+
js.configs.recommended,
|
|
13
|
+
reactHooks.configs.flat.recommended,
|
|
14
|
+
reactRefresh.configs.vite,
|
|
15
|
+
],
|
|
16
|
+
languageOptions: {
|
|
17
|
+
ecmaVersion: 2020,
|
|
18
|
+
globals: globals.browser,
|
|
19
|
+
parserOptions: {
|
|
20
|
+
ecmaVersion: 'latest',
|
|
21
|
+
ecmaFeatures: { jsx: true },
|
|
22
|
+
sourceType: 'module',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
rules: {
|
|
26
|
+
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
])
|
|
@@ -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
|
+
<link rel="stylesheet" href="./src/index.css">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
8
|
+
<title>react-pr03</title>
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
<script type="module" src="/src/main.jsx"></script>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|