create-mb-starter 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/index.js +20 -0
- package/package.json +8 -0
- package/template/.env +7 -0
- package/template/eslint.config.js +39 -0
- package/template/index.html +13 -0
- package/template/package-lock.json +4650 -0
- package/template/package.json +28 -0
- package/template/public/vite.svg +1 -0
- package/template/src/App.css +0 -0
- package/template/src/App.jsx +33 -0
- package/template/src/assets/react.svg +1 -0
- package/template/src/index.css +0 -0
- package/template/src/main.jsx +11 -0
- package/template/src/pages/Felvisz.jsx +83 -0
- package/template/src/pages/Home.jsx +31 -0
- package/template/vite.config.js +11 -0
package/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const { execSync } = require("child_process");
|
|
6
|
+
|
|
7
|
+
const projectName = process.argv[2] || "my-app";
|
|
8
|
+
const targetDir = path.join(process.cwd(), projectName);
|
|
9
|
+
const templateDir = path.join(__dirname, "template");
|
|
10
|
+
|
|
11
|
+
// Copy template
|
|
12
|
+
fs.cpSync(templateDir, targetDir, { recursive: true });
|
|
13
|
+
|
|
14
|
+
console.log("Installing dependencies...");
|
|
15
|
+
execSync("npm install", { cwd: targetDir, stdio: "inherit" });
|
|
16
|
+
|
|
17
|
+
console.log(`\nProject created: ${projectName}`);
|
|
18
|
+
console.log(`\nNext steps:`);
|
|
19
|
+
console.log(` cd ${projectName}`);
|
|
20
|
+
console.log(` npm run dev`);
|
package/package.json
ADDED
package/template/.env
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import react from 'eslint-plugin-react'
|
|
4
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
5
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
6
|
+
|
|
7
|
+
export default [
|
|
8
|
+
{ ignores: ['dist'] },
|
|
9
|
+
{
|
|
10
|
+
files: ['**/*.{js,jsx}'],
|
|
11
|
+
languageOptions: {
|
|
12
|
+
ecmaVersion: 2020,
|
|
13
|
+
globals: globals.browser,
|
|
14
|
+
parserOptions: {
|
|
15
|
+
ecmaVersion: 'latest',
|
|
16
|
+
ecmaFeatures: { jsx: true },
|
|
17
|
+
sourceType: 'module',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
settings: { react: { version: '18.3' } },
|
|
21
|
+
plugins: {
|
|
22
|
+
react,
|
|
23
|
+
'react-hooks': reactHooks,
|
|
24
|
+
'react-refresh': reactRefresh,
|
|
25
|
+
},
|
|
26
|
+
rules: {
|
|
27
|
+
...js.configs.recommended.rules,
|
|
28
|
+
...react.configs.recommended.rules,
|
|
29
|
+
...react.configs['jsx-runtime'].rules,
|
|
30
|
+
...reactHooks.configs.recommended.rules,
|
|
31
|
+
'react/jsx-no-target-blank': 'off',
|
|
32
|
+
'react/prop-types': 'off',
|
|
33
|
+
'react-refresh/only-export-components': [
|
|
34
|
+
'warn',
|
|
35
|
+
{ allowConstantExport: true },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
]
|
|
@@ -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="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>Vite + React</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.jsx"></script>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|