@tomjs/create-app 1.5.0 → 1.5.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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomjs/create-app",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.2",
|
|
5
5
|
"description": "create tomjs web app",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tomjs",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"@tomjs/eslint": "^3.3.0",
|
|
59
59
|
"@tomjs/prettier": "^1.4.1",
|
|
60
60
|
"@tomjs/stylelint": "^2.6.1",
|
|
61
|
-
"@tomjs/tsconfig": "^1.7.
|
|
61
|
+
"@tomjs/tsconfig": "^1.7.1",
|
|
62
62
|
"@types/inquirer": "^9.0.7",
|
|
63
63
|
"@types/lodash-es": "^4.17.12",
|
|
64
64
|
"@types/node": "^18.19.39",
|
|
@@ -49,7 +49,9 @@ function createWindow() {
|
|
|
49
49
|
if (isDev) {
|
|
50
50
|
win.loadURL(serverUrl);
|
|
51
51
|
// Open devTool if the app is not packaged
|
|
52
|
-
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
win?.webContents.openDevTools();
|
|
54
|
+
}, 500);
|
|
53
55
|
} else {
|
|
54
56
|
win.loadFile(indexHtml);
|
|
55
57
|
}
|
|
@@ -3,7 +3,7 @@ import electron from '@tomjs/vite-plugin-electron';
|
|
|
3
3
|
import react from '@vitejs/plugin-react-swc';
|
|
4
4
|
import { defineConfig } from 'vite';
|
|
5
5
|
import renderer from 'vite-plugin-electron-renderer';
|
|
6
|
-
import pkg from '
|
|
6
|
+
import pkg from './package.json';
|
|
7
7
|
|
|
8
8
|
// https://vitejs.dev/config/
|
|
9
9
|
export default defineConfig(() => {
|
|
@@ -49,7 +49,9 @@ function createWindow() {
|
|
|
49
49
|
if (isDev) {
|
|
50
50
|
win.loadURL(serverUrl);
|
|
51
51
|
// Open devTool if the app is not packaged
|
|
52
|
-
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
win?.webContents.openDevTools();
|
|
54
|
+
}, 500);
|
|
53
55
|
} else {
|
|
54
56
|
win.loadFile(indexHtml);
|
|
55
57
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
|
|
8
|
+
<title>Vite + Electron + Vue + TS</title>
|
|
9
|
+
</head>
|
|
10
|
+
|
|
11
|
+
<body>
|
|
12
|
+
<div id="app"></div>
|
|
13
|
+
<script type="module" src="/src/main.ts"></script>
|
|
14
|
+
</body>
|
|
15
|
+
</html>
|