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 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
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "create-mb-starter",
3
+ "type": "commonjs",
4
+ "version": "1.0.0",
5
+ "bin": {
6
+ "create-mb-starter": "./index.js"
7
+ }
8
+ }
package/template/.env ADDED
@@ -0,0 +1,7 @@
1
+ # Mivel ez egy Vite projekt, az environment variableokat VITE_ prefixszel kell kezdeni,
2
+ # hogy azok elérhetőek legyenek!
3
+ VITE_API_BASE_URL=http://localhost:3000/api
4
+
5
+ # API végpontok
6
+ VITE_API_EGY_OLDAL=/gyartok
7
+ VITE_API_TOBB_OLDAL=/telefonok
@@ -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>