@tomjs/create-app 4.2.0 → 5.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/dist/index.mjs +10 -9
- package/locales/en-US.json +1 -0
- package/locales/zh-CN.json +1 -0
- package/package.json +1 -1
- package/templates/config/base/.vscode/settings.json +1 -1
- package/templates/config/base/package.json +1 -0
- package/templates/config/electron/package.json +13 -0
- package/templates/config/npm/LICENSE +21 -0
- package/templates/config/npm/package.json +10 -0
- package/templates/config/public/package.json +1 -8
- package/templates/{web-react → config/react}/_eslint.config.mjs +0 -1
- package/templates/config/react/package.json +15 -0
- package/templates/config/style/lint-staged.config.mjs +1 -1
- package/templates/{vscode-vue → config/vscode}/.vscode/settings.json +1 -1
- package/templates/config/vscode/package.json +49 -0
- package/templates/config/vue/package.json +11 -0
- package/templates/electron-react/package.json +3 -25
- package/templates/electron-react/pnpm-workspace.yaml +1 -0
- package/templates/electron-vue/package.json +3 -19
- package/templates/electron-vue/pnpm-workspace.yaml +1 -0
- package/templates/electron-vue/tsconfig.node.json +1 -1
- package/templates/node-cli/.vscode/settings.json +15 -51
- package/templates/node-vite/examples/react/package.json +1 -1
- package/templates/node-vite/examples/react/vite.config.ts +2 -2
- package/templates/node-vite/examples/vue/package.json +1 -1
- package/templates/node-vite/examples/vue/vite.config.ts +2 -2
- package/templates/vscode-base/.vscode/launch.json +1 -0
- package/templates/vscode-base/.vscode/settings.json +1 -1
- package/templates/vscode-base/.vscode/tasks.json +1 -1
- package/templates/vscode-react/package.json +1 -54
- package/templates/vscode-react/tsconfig.app.json +2 -8
- package/templates/vscode-react/tsconfig.node.json +2 -7
- package/templates/vscode-vue/package.json +1 -50
- package/templates/vscode-vue/tsconfig.app.json +2 -9
- package/templates/vscode-vue/tsconfig.node.json +2 -7
- package/templates/web-react/package.json +0 -16
- package/templates/web-react/tsconfig.app.json +2 -8
- package/templates/web-react/tsconfig.json +2 -6
- package/templates/web-react/tsconfig.node.json +1 -3
- package/templates/web-vue/package.json +0 -10
- package/templates/web-vue/tsconfig.app.json +2 -9
- package/templates/web-vue/tsconfig.json +2 -6
- package/templates/web-vue/tsconfig.node.json +1 -3
- package/templates/electron-react/_eslint.config.mjs +0 -3
- package/templates/electron-react/electron/env.d.ts +0 -1
- package/templates/electron-react/electron/main/index.ts +0 -130
- package/templates/electron-vue/.vscode/launch.json +0 -48
- package/templates/electron-vue/.vscode/tasks.json +0 -67
- package/templates/electron-vue/_eslint.config.mjs +0 -3
- package/templates/electron-vue/electron/preload/index.ts +0 -4
- package/templates/vscode-react/.vscode/settings.json +0 -59
- package/templates/vscode-vue/.vscode/extensions.json +0 -5
- package/templates/vscode-vue/.vscode/launch.json +0 -34
- package/templates/vscode-vue/.vscode/tasks.json +0 -45
- package/templates/vscode-vue/.vscodeignore +0 -73
- package/templates/vscode-vue/_.gitignore +0 -65
- package/templates/vscode-vue/extension/index.ts +0 -21
- package/templates/vscode-vue/extension/views/helper.ts +0 -29
- package/templates/vscode-vue/extension/views/panel.ts +0 -49
- package/templates/vscode-vue/locales/en.json +0 -6
- package/templates/vscode-vue/locales/zh-CN.json +0 -6
- package/templates/vscode-vue/resources/logo.png +0 -0
- package/templates/vscode-vue/resources/logo.svg +0 -1
- package/templates/web-vue/_eslint.config.mjs +0 -6
- package/templates/web-vue/public/vite.svg +0 -1
- /package/templates/{electron-react → config/electron}/.vscode/launch.json +0 -0
- /package/templates/{electron-react → config/electron}/.vscode/tasks.json +0 -0
- /package/templates/{electron-vue → config/electron}/electron/main/index.ts +0 -0
- /package/templates/{electron-react → config/electron}/electron/preload/index.ts +0 -0
- /package/templates/{electron-react → config/electron}/public/vite.svg +0 -0
- /package/templates/config/{public → npm}/README.md +0 -0
- /package/templates/config/{public → npm}/README.zh_CN.md +0 -0
- /package/templates/{electron-vue → config/react}/public/vite.svg +0 -0
- /package/templates/{vscode-react → config/vscode}/.vscode/extensions.json +0 -0
- /package/templates/{vscode-react → config/vscode}/.vscode/launch.json +0 -0
- /package/templates/{vscode-react → config/vscode}/.vscode/tasks.json +0 -0
- /package/templates/{vscode-react → config/vscode}/.vscodeignore +0 -0
- /package/templates/{vscode-react → config/vscode}/_.gitignore +0 -0
- /package/templates/{vscode-react → config/vscode}/extension/index.ts +0 -0
- /package/templates/{vscode-react → config/vscode}/extension/views/helper.ts +0 -0
- /package/templates/{vscode-react → config/vscode}/extension/views/panel.ts +0 -0
- /package/templates/{vscode-react → config/vscode}/locales/en.json +0 -0
- /package/templates/{vscode-react → config/vscode}/locales/zh-CN.json +0 -0
- /package/templates/{vscode-react → config/vscode}/resources/logo.png +0 -0
- /package/templates/{vscode-react → config/vscode}/resources/logo.svg +0 -0
- /package/templates/{web-react → config/vue}/public/vite.svg +0 -0
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# logs
|
|
2
|
-
*.log
|
|
3
|
-
lerna-debug.log*
|
|
4
|
-
logs
|
|
5
|
-
npm-debug.log*
|
|
6
|
-
pnpm-debug.log*
|
|
7
|
-
yarn-debug.log*
|
|
8
|
-
yarn-error.log*
|
|
9
|
-
|
|
10
|
-
# diagnostic reports (https://nodejs.org/api/report.html)
|
|
11
|
-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
12
|
-
|
|
13
|
-
# runtime data
|
|
14
|
-
*.pid
|
|
15
|
-
*.pid.lock
|
|
16
|
-
*.seed
|
|
17
|
-
pids
|
|
18
|
-
|
|
19
|
-
# dependency directory
|
|
20
|
-
node_modules
|
|
21
|
-
|
|
22
|
-
# cache
|
|
23
|
-
.cache
|
|
24
|
-
.npm
|
|
25
|
-
.tmp
|
|
26
|
-
.temp
|
|
27
|
-
.eslintcache
|
|
28
|
-
.stylelintcache
|
|
29
|
-
tsconfig.tsbuildinfo
|
|
30
|
-
|
|
31
|
-
# environment
|
|
32
|
-
*.local
|
|
33
|
-
|
|
34
|
-
# macOS
|
|
35
|
-
.DS_Store
|
|
36
|
-
|
|
37
|
-
# package files
|
|
38
|
-
*.7z
|
|
39
|
-
*.gz
|
|
40
|
-
*.gzip
|
|
41
|
-
*.rar
|
|
42
|
-
*.tar
|
|
43
|
-
*.tar.*
|
|
44
|
-
*.tgz
|
|
45
|
-
*.zip
|
|
46
|
-
*.vsix
|
|
47
|
-
|
|
48
|
-
# IDEA
|
|
49
|
-
.idea
|
|
50
|
-
|
|
51
|
-
# vscode
|
|
52
|
-
.vscode
|
|
53
|
-
.history
|
|
54
|
-
|
|
55
|
-
# project
|
|
56
|
-
src
|
|
57
|
-
extensions
|
|
58
|
-
locales
|
|
59
|
-
|
|
60
|
-
.husky
|
|
61
|
-
.commitlintrc*
|
|
62
|
-
.editorconfig
|
|
63
|
-
.eslintrc*
|
|
64
|
-
.eslintignore
|
|
65
|
-
.gitattributes
|
|
66
|
-
.gitignore
|
|
67
|
-
.lintstagedrc*
|
|
68
|
-
.prettierrc*
|
|
69
|
-
.prettierignore
|
|
70
|
-
pnpm-lock.yaml
|
|
71
|
-
tsconfig.json
|
|
72
|
-
tsconfig.*.json
|
|
73
|
-
*.config.ts
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# logs
|
|
2
|
-
*.log
|
|
3
|
-
lerna-debug.log*
|
|
4
|
-
logs
|
|
5
|
-
npm-debug.log*
|
|
6
|
-
pnpm-debug.log*
|
|
7
|
-
yarn-debug.log*
|
|
8
|
-
yarn-error.log*
|
|
9
|
-
|
|
10
|
-
# diagnostic reports (https://nodejs.org/api/report.html)
|
|
11
|
-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
12
|
-
|
|
13
|
-
# runtime data
|
|
14
|
-
*.pid
|
|
15
|
-
*.pid.lock
|
|
16
|
-
*.seed
|
|
17
|
-
pids
|
|
18
|
-
|
|
19
|
-
# dependency directory
|
|
20
|
-
bower_components
|
|
21
|
-
jspm_packages
|
|
22
|
-
node_modules
|
|
23
|
-
web_modules
|
|
24
|
-
|
|
25
|
-
# cache
|
|
26
|
-
.cache
|
|
27
|
-
.npm
|
|
28
|
-
.tmp
|
|
29
|
-
.temp
|
|
30
|
-
.eslintcache
|
|
31
|
-
.stylelintcache
|
|
32
|
-
tsconfig.tsbuildinfo
|
|
33
|
-
|
|
34
|
-
# environment
|
|
35
|
-
*.local
|
|
36
|
-
|
|
37
|
-
# macOS
|
|
38
|
-
.DS_Store
|
|
39
|
-
|
|
40
|
-
# package files
|
|
41
|
-
*.7z
|
|
42
|
-
*.gz
|
|
43
|
-
*.gzip
|
|
44
|
-
*.rar
|
|
45
|
-
*.tar
|
|
46
|
-
*.tar.*
|
|
47
|
-
*.tgz
|
|
48
|
-
*.zip
|
|
49
|
-
*.vsix
|
|
50
|
-
|
|
51
|
-
# IDEA
|
|
52
|
-
.idea
|
|
53
|
-
|
|
54
|
-
# vscode
|
|
55
|
-
.history
|
|
56
|
-
.vscode/i18n-ally-reviews.yml
|
|
57
|
-
|
|
58
|
-
# build output
|
|
59
|
-
build
|
|
60
|
-
dist
|
|
61
|
-
release
|
|
62
|
-
|
|
63
|
-
package.nls.json
|
|
64
|
-
package.nls.*.json
|
|
65
|
-
src/vscode.d.ts
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ExtensionContext } from 'vscode';
|
|
2
|
-
import { i18n, initExtension } from '@tomjs/vscode';
|
|
3
|
-
import { commands, window } from 'vscode';
|
|
4
|
-
import { MainPanel } from './views/panel';
|
|
5
|
-
|
|
6
|
-
export function activate(context: ExtensionContext) {
|
|
7
|
-
initExtension(context);
|
|
8
|
-
|
|
9
|
-
context.subscriptions.push(
|
|
10
|
-
commands.registerCommand('tomjs.xxx.showHello', async () => {
|
|
11
|
-
window.showInformationMessage(i18n.t('tomjs.commands.hello'));
|
|
12
|
-
}),
|
|
13
|
-
);
|
|
14
|
-
context.subscriptions.push(
|
|
15
|
-
commands.registerCommand('tomjs.xxx.showPanel', async () => {
|
|
16
|
-
MainPanel.render(context);
|
|
17
|
-
}),
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function deactivate() {}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { Disposable, ExtensionContext, Webview } from 'vscode';
|
|
2
|
-
import { getWebviewHtml } from 'virtual:vscode';
|
|
3
|
-
import { window } from 'vscode';
|
|
4
|
-
|
|
5
|
-
export class WebviewHelper {
|
|
6
|
-
public static setupHtml(webview: Webview, context: ExtensionContext) {
|
|
7
|
-
return getWebviewHtml({
|
|
8
|
-
serverUrl: process.env.VITE_DEV_SERVER_URL,
|
|
9
|
-
webview,
|
|
10
|
-
context,
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public static setupWebviewHooks(webview: Webview, disposables: Disposable[]) {
|
|
15
|
-
webview.onDidReceiveMessage(
|
|
16
|
-
(message: any) => {
|
|
17
|
-
const command = message.command;
|
|
18
|
-
const text = message.text;
|
|
19
|
-
console.log(`command: ${command}`);
|
|
20
|
-
switch (command) {
|
|
21
|
-
case 'hello':
|
|
22
|
-
window.showInformationMessage(text);
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
undefined,
|
|
26
|
-
disposables,
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { Disposable, ExtensionContext, WebviewPanel } from 'vscode';
|
|
2
|
-
import { ViewColumn, window } from 'vscode';
|
|
3
|
-
import { WebviewHelper } from './helper';
|
|
4
|
-
|
|
5
|
-
export class MainPanel {
|
|
6
|
-
public static currentPanel: MainPanel | undefined;
|
|
7
|
-
private readonly _panel: WebviewPanel;
|
|
8
|
-
private _disposables: Disposable[] = [];
|
|
9
|
-
|
|
10
|
-
private constructor(panel: WebviewPanel, context: ExtensionContext) {
|
|
11
|
-
this._panel = panel;
|
|
12
|
-
|
|
13
|
-
this._panel.onDidDispose(() => this.dispose(), null, this._disposables);
|
|
14
|
-
this._panel.webview.html = WebviewHelper.setupHtml(this._panel.webview, context);
|
|
15
|
-
|
|
16
|
-
WebviewHelper.setupWebviewHooks(this._panel.webview, this._disposables);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
public static render(context: ExtensionContext) {
|
|
20
|
-
if (MainPanel.currentPanel) {
|
|
21
|
-
MainPanel.currentPanel._panel.reveal(ViewColumn.One);
|
|
22
|
-
}
|
|
23
|
-
else {
|
|
24
|
-
const panel = window.createWebviewPanel('showHelloWorld', 'Hello World', ViewColumn.One, {
|
|
25
|
-
enableScripts: true,
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
MainPanel.currentPanel = new MainPanel(panel, context);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Cleans up and disposes of webview resources when the webview panel is closed.
|
|
34
|
-
*/
|
|
35
|
-
public dispose() {
|
|
36
|
-
MainPanel.currentPanel = undefined;
|
|
37
|
-
|
|
38
|
-
// Dispose of the current webview panel
|
|
39
|
-
this._panel.dispose();
|
|
40
|
-
|
|
41
|
-
// Dispose of all disposables (i.e. commands) for the current webview panel
|
|
42
|
-
while (this._disposables.length) {
|
|
43
|
-
const disposable = this._disposables.pop();
|
|
44
|
-
if (disposable) {
|
|
45
|
-
disposable.dispose();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1717641233000" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3499" width="256" height="256" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M396.24 502.47m-41.91 0a41.91 41.91 0 1 0 83.82 0 41.91 41.91 0 1 0-83.82 0Z" fill="#005ba4" p-id="3500"></path><path d="M615.18 502.47m-41.91 0a41.91 41.91 0 1 0 83.82 0 41.91 41.91 0 1 0-83.82 0Z" fill="#005ba4" p-id="3501"></path><path d="M504.6 863.45c-216.57 0-348.06-211.65-348.06-304.73 0-177.6 156.14-322.1 348.06-322.1s348.06 144.5 348.06 322.1c0 91.13-118.42 304.73-348.06 304.73z m0-577.28c-164.6 0-298.51 122.26-298.51 272.55 0 73.6 118.97 255.18 298.51 255.18 193.9 0 298.51-181.13 298.51-255.18 0-150.29-133.91-272.55-298.51-272.55z" fill="#005ba4" p-id="3502"></path><path d="M181.3 583.5c-13.19 0-24.16-10.4-24.73-23.71l-15.63-360.94c-0.4-9.23 4.37-17.9 12.37-22.52a24.7 24.7 0 0 1 25.69 0.56l166.11 105.86c11.54 7.35 14.93 22.66 7.58 34.19-7.35 11.55-22.64 14.94-34.21 7.58L192.5 244.25l13.57 313.4c0.6 13.66-10.01 25.23-23.68 25.82-0.36 0.03-0.72 0.03-1.09 0.03zM830.12 583.5c-0.36 0-0.73 0-1.09-0.02-13.67-0.6-24.27-12.16-23.68-25.82l13.57-313.4-125.98 80.27c-11.56 7.34-26.86 3.95-34.21-7.56-7.35-11.55-3.96-26.85 7.58-34.21l166.1-105.86c7.8-5 17.7-5.21 25.69-0.56 8 4.61 12.77 13.29 12.37 22.52L854.84 559.8c-0.56 13.29-11.53 23.7-24.72 23.7zM911.81 790.16c-2 0-4.04-0.24-6.06-0.76l-234.1-58.97c-13.27-3.34-21.31-16.81-17.98-30.06 3.34-13.26 16.85-21.34 30.07-17.97l234.1 58.97c13.27 3.34 21.31 16.81 17.98 30.06-2.83 11.25-12.92 18.73-24.01 18.73zM116.13 790.16c-11.09 0-21.18-7.48-24.01-18.73-3.34-13.26 4.7-26.73 17.98-30.06l234.1-58.97c13.23-3.42 26.73 4.69 30.07 17.97 3.34 13.26-4.7 26.73-17.98 30.06l-234.1 58.97c-2.02 0.52-4.06 0.76-6.06 0.76zM340.67 633.18H40.23c-13.69 0-24.77-11.1-24.77-24.77 0-13.68 11.09-24.77 24.77-24.77h300.44c13.69 0 24.77 11.1 24.77 24.77s-11.09 24.77-24.77 24.77zM984.31 633.18H683.87c-13.69 0-24.77-11.1-24.77-24.77 0-13.68 11.09-24.77 24.77-24.77h300.44c13.69 0 24.77 11.1 24.77 24.77s-11.09 24.77-24.77 24.77z" fill="#005ba4" p-id="3503"></path><path d="M510.89 576.08m-33.31 0a33.31 33.31 0 1 0 66.62 0 33.31 33.31 0 1 0-66.62 0Z" fill="#005ba4" p-id="3504"></path><path d="M454.4 690.66c-44.81 0-81.27-36.45-81.27-81.27 0-13.68 11.09-24.77 24.77-24.77 13.69 0 24.77 11.1 24.77 24.77 0 17.5 14.23 31.73 31.73 31.73s31.72-14.23 31.72-31.73c0-13.68 11.09-24.77 24.77-24.77s24.77 11.1 24.77 24.77c0.01 44.82-36.45 81.27-81.26 81.27z" fill="#005ba4" p-id="3505"></path><path d="M567.39 690.66c-44.81 0-81.27-36.45-81.27-81.27 0-13.68 11.09-24.77 24.77-24.77s24.77 11.1 24.77 24.77c0 17.5 14.23 31.73 31.73 31.73s31.72-14.23 31.72-31.73c0-13.68 11.09-24.77 24.77-24.77s24.77 11.1 24.77 24.77c0.01 44.82-36.45 81.27-81.26 81.27z" fill="#005ba4" p-id="3506"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|