@tomjs/create-app 4.1.1 → 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.
Files changed (86) hide show
  1. package/dist/index.mjs +10 -9
  2. package/locales/en-US.json +1 -0
  3. package/locales/zh-CN.json +1 -0
  4. package/package.json +3 -3
  5. package/templates/config/base/.vscode/settings.json +1 -1
  6. package/templates/config/base/package.json +1 -0
  7. package/templates/config/electron/package.json +13 -0
  8. package/templates/config/npm/LICENSE +21 -0
  9. package/templates/config/npm/package.json +10 -0
  10. package/templates/config/package.json +2 -2
  11. package/templates/config/public/package.json +1 -8
  12. package/templates/{web-react → config/react}/_eslint.config.mjs +0 -1
  13. package/templates/config/react/package.json +15 -0
  14. package/templates/config/style/lint-staged.config.mjs +1 -1
  15. package/templates/{vscode-vue → config/vscode}/.vscode/settings.json +1 -1
  16. package/templates/config/vscode/package.json +49 -0
  17. package/templates/config/vue/package.json +11 -0
  18. package/templates/electron-react/package.json +3 -25
  19. package/templates/electron-react/pnpm-workspace.yaml +1 -0
  20. package/templates/electron-vue/package.json +3 -19
  21. package/templates/electron-vue/pnpm-workspace.yaml +1 -0
  22. package/templates/electron-vue/tsconfig.node.json +1 -1
  23. package/templates/node-cli/.vscode/settings.json +15 -51
  24. package/templates/node-vite/examples/react/package.json +1 -1
  25. package/templates/node-vite/examples/react/vite.config.ts +2 -2
  26. package/templates/node-vite/examples/vue/package.json +1 -1
  27. package/templates/node-vite/examples/vue/vite.config.ts +2 -2
  28. package/templates/vscode-base/.vscode/launch.json +1 -0
  29. package/templates/vscode-base/.vscode/settings.json +1 -1
  30. package/templates/vscode-base/.vscode/tasks.json +1 -1
  31. package/templates/vscode-react/package.json +1 -54
  32. package/templates/vscode-react/tsconfig.app.json +2 -8
  33. package/templates/vscode-react/tsconfig.node.json +3 -5
  34. package/templates/vscode-vue/package.json +1 -50
  35. package/templates/vscode-vue/tsconfig.app.json +3 -9
  36. package/templates/vscode-vue/tsconfig.node.json +3 -5
  37. package/templates/web-react/package.json +0 -16
  38. package/templates/web-react/tsconfig.app.json +1 -0
  39. package/templates/web-vue/package.json +0 -10
  40. package/templates/web-vue/tsconfig.app.json +1 -0
  41. package/templates/electron-react/_eslint.config.mjs +0 -3
  42. package/templates/electron-react/electron/env.d.ts +0 -1
  43. package/templates/electron-react/electron/main/index.ts +0 -130
  44. package/templates/electron-vue/.vscode/launch.json +0 -48
  45. package/templates/electron-vue/.vscode/tasks.json +0 -67
  46. package/templates/electron-vue/_eslint.config.mjs +0 -3
  47. package/templates/electron-vue/electron/preload/index.ts +0 -4
  48. package/templates/vscode-react/.vscode/settings.json +0 -59
  49. package/templates/vscode-react/extension/env.d.ts +0 -1
  50. package/templates/vscode-vue/.vscode/extensions.json +0 -5
  51. package/templates/vscode-vue/.vscode/launch.json +0 -34
  52. package/templates/vscode-vue/.vscode/tasks.json +0 -45
  53. package/templates/vscode-vue/.vscodeignore +0 -73
  54. package/templates/vscode-vue/_.gitignore +0 -65
  55. package/templates/vscode-vue/extension/env.d.ts +0 -1
  56. package/templates/vscode-vue/extension/index.ts +0 -21
  57. package/templates/vscode-vue/extension/views/helper.ts +0 -29
  58. package/templates/vscode-vue/extension/views/panel.ts +0 -49
  59. package/templates/vscode-vue/locales/en.json +0 -6
  60. package/templates/vscode-vue/locales/zh-CN.json +0 -6
  61. package/templates/vscode-vue/resources/logo.png +0 -0
  62. package/templates/vscode-vue/resources/logo.svg +0 -1
  63. package/templates/web-vue/_eslint.config.mjs +0 -6
  64. package/templates/web-vue/public/vite.svg +0 -1
  65. /package/templates/config/base/{.editorconfig → _.editorconfig} +0 -0
  66. /package/templates/{electron-react → config/electron}/.vscode/launch.json +0 -0
  67. /package/templates/{electron-react → config/electron}/.vscode/tasks.json +0 -0
  68. /package/templates/{electron-vue → config/electron}/electron/main/index.ts +0 -0
  69. /package/templates/{electron-react → config/electron}/electron/preload/index.ts +0 -0
  70. /package/templates/{electron-react → config/electron}/public/vite.svg +0 -0
  71. /package/templates/config/{public → npm}/README.md +0 -0
  72. /package/templates/config/{public → npm}/README.zh_CN.md +0 -0
  73. /package/templates/{electron-vue → config/react}/public/vite.svg +0 -0
  74. /package/templates/{vscode-react → config/vscode}/.vscode/extensions.json +0 -0
  75. /package/templates/{vscode-react → config/vscode}/.vscode/launch.json +0 -0
  76. /package/templates/{vscode-react → config/vscode}/.vscode/tasks.json +0 -0
  77. /package/templates/{vscode-react → config/vscode}/.vscodeignore +0 -0
  78. /package/templates/{vscode-react → config/vscode}/_.gitignore +0 -0
  79. /package/templates/{vscode-react → config/vscode}/extension/index.ts +0 -0
  80. /package/templates/{vscode-react → config/vscode}/extension/views/helper.ts +0 -0
  81. /package/templates/{vscode-react → config/vscode}/extension/views/panel.ts +0 -0
  82. /package/templates/{vscode-react → config/vscode}/locales/en.json +0 -0
  83. /package/templates/{vscode-react → config/vscode}/locales/zh-CN.json +0 -0
  84. /package/templates/{vscode-react → config/vscode}/resources/logo.png +0 -0
  85. /package/templates/{vscode-react → config/vscode}/resources/logo.svg +0 -0
  86. /package/templates/{web-react → config/vue}/public/vite.svg +0 -0
@@ -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 +0,0 @@
1
- /// <reference types="@tomjs/vite-plugin-vscode/env" />
@@ -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
- }
@@ -1,6 +0,0 @@
1
- {
2
- "description": "This is a Tomjs Extension.",
3
- "displayName": "Tomjs Extension",
4
- "tomjs.commands.hello": "Show Hello",
5
- "tomjs.commands.panel": "Open Panel"
6
- }
@@ -1,6 +0,0 @@
1
- {
2
- "description": "这是一个 Tomjs 扩展。",
3
- "displayName": "Tomjs 扩展",
4
- "tomjs.commands.hello": "显示你好",
5
- "tomjs.commands.panel": "打开面板"
6
- }
@@ -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,6 +0,0 @@
1
- import defineConfig from '@tomjs/eslint';
2
-
3
- export default defineConfig({
4
- vue: true,
5
- typescript: true,
6
- });
@@ -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