create-electron-vite-react-ts 0.1.0 → 0.1.2
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/.gitignore +0 -1
- package/README.md +5 -1
- package/bin/create-electron-vite-react-ts.js +1 -2
- package/eslint.config.mjs +48 -0
- package/package.json +9 -10
- package/.eslintrc.cjs +0 -26
- package/.nvmrc +0 -1
package/.gitignore
CHANGED
package/README.md
CHANGED
|
@@ -5,6 +5,10 @@ It uses **[electron-vite](https://electron-vite.org/)** to build the main, prelo
|
|
|
5
5
|
The baseline includes essential cross-platform desktop capabilities for **Windows, macOS, and Linux** (window lifecycle/state restore, safe IPC bridge, external-link handling, environment-driven startup behavior, and logging).
|
|
6
6
|
It also presents a production-oriented architecture that helps teams design and extend the exact product they want by separating Electron main, preload, and renderer responsibilities clearly.
|
|
7
7
|
|
|
8
|
+
- Source: [GitHub Repository](https://github.com/Road-Glide/electron-vite-react-ts)
|
|
9
|
+
- Issues: [Bug Reports & Feature Requests](https://github.com/Road-Glide/electron-vite-react-ts/issues)
|
|
10
|
+
- npm: [create-electron-vite-react-ts](https://www.npmjs.com/package/create-electron-vite-react-ts)
|
|
11
|
+
|
|
8
12
|
|
|
9
13
|
## Create CLI Usage
|
|
10
14
|
|
|
@@ -14,7 +18,7 @@ Publish this package to npm as `create-electron-vite-react-ts`, then bootstrap a
|
|
|
14
18
|
npx create-electron-vite-react-ts my-desktop-app
|
|
15
19
|
cd my-desktop-app
|
|
16
20
|
npm install
|
|
17
|
-
npm run
|
|
21
|
+
npm run start
|
|
18
22
|
```
|
|
19
23
|
|
|
20
24
|
## Requirements
|
|
@@ -11,9 +11,8 @@ const TEMPLATE_DIRS = ['electron', 'public', 'src']
|
|
|
11
11
|
const TEMPLATE_FILES = [
|
|
12
12
|
'.editorconfig',
|
|
13
13
|
'.env.example',
|
|
14
|
-
'.
|
|
14
|
+
'eslint.config.mjs',
|
|
15
15
|
'.gitignore',
|
|
16
|
-
'.nvmrc',
|
|
17
16
|
'.prettierignore',
|
|
18
17
|
'.prettierrc',
|
|
19
18
|
'electron.vite.config.ts',
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import globals from 'globals'
|
|
3
|
+
import tsParser from '@typescript-eslint/parser'
|
|
4
|
+
import tsPlugin from '@typescript-eslint/eslint-plugin'
|
|
5
|
+
import reactHooks from 'eslint-plugin-react-hooks'
|
|
6
|
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
7
|
+
|
|
8
|
+
export default [
|
|
9
|
+
{
|
|
10
|
+
ignores: ['dist/**', 'release/**', 'node_modules/**'],
|
|
11
|
+
},
|
|
12
|
+
js.configs.recommended,
|
|
13
|
+
{
|
|
14
|
+
files: ['bin/**/*.js'],
|
|
15
|
+
languageOptions: {
|
|
16
|
+
globals: globals.node,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
files: ['**/*.{ts,tsx}'],
|
|
21
|
+
languageOptions: {
|
|
22
|
+
parser: tsParser,
|
|
23
|
+
ecmaVersion: 2020,
|
|
24
|
+
sourceType: 'module',
|
|
25
|
+
globals: globals.browser,
|
|
26
|
+
},
|
|
27
|
+
plugins: {
|
|
28
|
+
'@typescript-eslint': tsPlugin,
|
|
29
|
+
'react-hooks': reactHooks,
|
|
30
|
+
'react-refresh': reactRefresh,
|
|
31
|
+
},
|
|
32
|
+
rules: {
|
|
33
|
+
...tsPlugin.configs.recommended.rules,
|
|
34
|
+
...reactHooks.configs.recommended.rules,
|
|
35
|
+
'react-refresh/only-export-components': 'warn',
|
|
36
|
+
'no-undef': 'off',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
files: ['electron/**/*.ts'],
|
|
41
|
+
languageOptions: {
|
|
42
|
+
globals: globals.node,
|
|
43
|
+
},
|
|
44
|
+
rules: {
|
|
45
|
+
'@typescript-eslint/no-namespace': 'off',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-electron-vite-react-ts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Create an Electron + Vite + React + TypeScript desktop app.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
"src",
|
|
15
15
|
".editorconfig",
|
|
16
16
|
".env.example",
|
|
17
|
-
".
|
|
17
|
+
"eslint.config.mjs",
|
|
18
18
|
".gitignore",
|
|
19
|
-
".nvmrc",
|
|
20
19
|
".prettierignore",
|
|
21
20
|
".prettierrc",
|
|
22
21
|
"electron.vite.config.ts",
|
|
@@ -46,17 +45,17 @@
|
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@types/react": "^18.2.64",
|
|
48
47
|
"@types/react-dom": "^18.2.21",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
50
|
-
"@typescript-eslint/parser": "^
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^8.58.2",
|
|
49
|
+
"@typescript-eslint/parser": "^8.58.2",
|
|
51
50
|
"@vitejs/plugin-react": "^4.2.1",
|
|
52
51
|
"electron": "^30.0.1",
|
|
53
|
-
"electron-builder": "^
|
|
54
|
-
"eslint": "^
|
|
55
|
-
"eslint-plugin-react-hooks": "^
|
|
56
|
-
"eslint-plugin-react-refresh": "^0.
|
|
52
|
+
"electron-builder": "^26.8.1",
|
|
53
|
+
"eslint": "^9.39.4",
|
|
54
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
55
|
+
"eslint-plugin-react-refresh": "^0.5.2",
|
|
57
56
|
"typescript": "^5.2.2",
|
|
58
57
|
"vite": "^6.4.2",
|
|
59
|
-
"vite-plugin-electron": "^0.
|
|
58
|
+
"vite-plugin-electron": "^0.29.1",
|
|
60
59
|
"vite-plugin-electron-renderer": "^0.14.5"
|
|
61
60
|
},
|
|
62
61
|
"build": {
|
package/.eslintrc.cjs
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
env: {
|
|
4
|
-
browser: true,
|
|
5
|
-
es2020: true,
|
|
6
|
-
node: true,
|
|
7
|
-
},
|
|
8
|
-
parser: '@typescript-eslint/parser',
|
|
9
|
-
plugins: ['@typescript-eslint', 'react-hooks', 'react-refresh'],
|
|
10
|
-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
|
|
11
|
-
ignorePatterns: ['dist'],
|
|
12
|
-
overrides: [
|
|
13
|
-
{
|
|
14
|
-
files: ['**/*.{ts,tsx}'],
|
|
15
|
-
rules: {
|
|
16
|
-
'react-refresh/only-export-components': 'warn',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
files: ['electron/dotenv.ts'],
|
|
21
|
-
rules: {
|
|
22
|
-
'@typescript-eslint/no-namespace': 'off',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
}
|
package/.nvmrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
22.21.1
|