@tomjs/create-app 1.5.1 → 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.1",
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.0",
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",
@@ -17,7 +17,7 @@
17
17
  "@tomjs/commitlint": "^3.3.0",
18
18
  "@tomjs/eslint": "^3.3.0",
19
19
  "@tomjs/prettier": "^1.4.1",
20
- "@tomjs/tsconfig": "^1.7.0",
20
+ "@tomjs/tsconfig": "^1.7.1",
21
21
  "@types/node": "^18.19.39",
22
22
  "eslint": "^8.57.0",
23
23
  "husky": "^9.0.11",
@@ -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
- win.webContents.openDevTools();
52
+ setTimeout(() => {
53
+ win?.webContents.openDevTools();
54
+ }, 500);
53
55
  } else {
54
56
  win.loadFile(indexHtml);
55
57
  }
@@ -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
- win.webContents.openDevTools();
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>