@tomjs/create-app 1.0.0 → 1.0.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/README.md +4 -0
- package/README.zh_CN.md +4 -0
- package/package.json +2 -2
- package/templates/base/core/.commitlintrc.cjs +3 -0
- package/templates/base/core/.editorconfig +15 -0
- package/templates/base/core/.eslintignore +14 -0
- package/templates/base/core/.gitattributes +203 -0
- package/templates/base/core/.husky/commit-msg +1 -0
- package/templates/base/core/.husky/pre-commit +1 -0
- package/templates/base/core/.prettierignore +17 -0
- package/templates/base/core/.prettierrc.cjs +1 -0
- package/templates/base/core/_eslintrc.cjs +7 -0
- package/templates/base/core/_gitignore +60 -0
- package/templates/base/core/_lintstagedrc.cjs +4 -0
- package/templates/base/core/package.json +30 -0
- package/templates/base/electron/.vscode/launch.json +28 -0
- package/templates/base/electron/.vscode/tasks.json +37 -0
- package/templates/base/electron/electron/env.d.ts +1 -0
- package/templates/base/electron/electron/main/index.ts +111 -0
- package/templates/base/electron/electron/polyfills.ts +4 -0
- package/templates/base/electron/electron/preload/index.ts +1 -0
- package/templates/base/electron/package.json +25 -0
- package/templates/base/electron/tsconfig.node.json +7 -0
- package/templates/base/node/LICENSE +21 -0
- package/templates/base/node/README.md +13 -0
- package/templates/base/node/README.zh_CN.md +13 -0
- package/templates/base/node/package.json +46 -0
- package/templates/base/node/test/index.test.ts +7 -0
- package/templates/base/react/_eslintrc.cjs +7 -0
- package/templates/base/react/_lintstagedrc.cjs +6 -0
- package/templates/base/react/package.json +19 -0
- package/templates/base/react/tsconfig.json +5 -0
- package/templates/base/react/tsconfig.node.json +7 -0
- package/templates/base/style/.stylelintignore +16 -0
- package/templates/base/style/.stylelintrc.cjs +3 -0
- package/templates/base/style/_lintstagedrc.cjs +5 -0
- package/templates/base/style/package.json +10 -0
- package/templates/base/vscode/.vscode/extensions.json +5 -0
- package/templates/base/vscode/.vscode/launch.json +21 -0
- package/templates/base/vscode/.vscode/settings.json +3 -0
- package/templates/base/vscode/.vscode/tasks.json +36 -0
- package/templates/base/vscode/.vscodeignore +73 -0
- package/templates/base/vscode/LICENSE +21 -0
- package/templates/base/vscode/_gitignore +63 -0
- package/templates/base/vscode/extension/env.d.ts +1 -0
- package/templates/base/vscode/extension/index.ts +21 -0
- package/templates/base/vscode/extension/views/helper.ts +27 -0
- package/templates/base/vscode/extension/views/panel.ts +48 -0
- package/templates/base/vscode/locales/en.json +6 -0
- package/templates/base/vscode/locales/zh-CN.json +5 -0
- package/templates/base/vscode/locales/zh-TW.json +5 -0
- package/templates/base/vscode/package.json +70 -0
- package/templates/base/vscode/resources/logo.png +0 -0
- package/templates/base/vscode/tsconfig.node.json +7 -0
- package/templates/base/vue/_eslintrc.cjs +7 -0
- package/templates/base/vue/_lintstagedrc.cjs +6 -0
- package/templates/base/vue/package.json +17 -0
- package/templates/base/vue/tsconfig.json +5 -0
- package/templates/base/vue/tsconfig.node.json +7 -0
- package/templates/config.json +105 -0
- package/templates/electron-react/README.md +3 -0
- package/templates/electron-react/electron/main/index.ts +128 -0
- package/templates/electron-react/index.html +15 -0
- package/templates/electron-react/package.json +26 -0
- package/templates/electron-react/public/img/icon.png +0 -0
- package/templates/electron-react/public/vite.svg +1 -0
- package/templates/electron-react/src/App.css +45 -0
- package/templates/electron-react/src/App.tsx +42 -0
- package/templates/electron-react/src/assets/electron.svg +10 -0
- package/templates/electron-react/src/assets/react.svg +1 -0
- package/templates/electron-react/src/index.css +69 -0
- package/templates/electron-react/src/main.tsx +11 -0
- package/templates/electron-react/src/vite-env.d.ts +1 -0
- package/templates/electron-react/vite.config.ts +27 -0
- package/templates/electron-vue/README.md +3 -0
- package/templates/electron-vue/electron/main/index.ts +123 -0
- package/templates/electron-vue/package.json +6 -0
- package/templates/electron-vue/public/img/icon.png +0 -0
- package/templates/electron-vue/public/vite.svg +1 -0
- package/templates/electron-vue/src/App.vue +55 -0
- package/templates/electron-vue/src/assets/electron.svg +10 -0
- package/templates/electron-vue/src/assets/vue.svg +1 -0
- package/templates/electron-vue/src/components/HelloWorld.vue +43 -0
- package/templates/electron-vue/src/main.ts +6 -0
- package/templates/electron-vue/src/style.css +80 -0
- package/templates/electron-vue/src/vite-env.d.ts +1 -0
- package/templates/electron-vue/vite.config.ts +26 -0
- package/templates/node/package.json +12 -0
- package/templates/node/src/index.ts +3 -0
- package/templates/node/tsconfig.json +4 -0
- package/templates/node/tsup.config.ts +19 -0
- package/templates/node-cli/.vscode/launch.json +23 -0
- package/templates/node-cli/index.d.ts +5 -0
- package/templates/node-cli/package.json +33 -0
- package/templates/node-cli/src/cli.ts +68 -0
- package/templates/node-cli/src/config.ts +28 -0
- package/templates/node-cli/src/constants.ts +1 -0
- package/templates/node-cli/src/index.ts +3 -0
- package/templates/node-cli/src/types.ts +1 -0
- package/templates/node-cli/tsconfig.json +4 -0
- package/templates/node-cli/tsup.config.ts +18 -0
- package/templates/node-cli/xxx.config.cjs +0 -0
- package/templates/node-cli-legacy/.vscode/launch.json +23 -0
- package/templates/node-cli-legacy/index.d.ts +5 -0
- package/templates/node-cli-legacy/package.json +31 -0
- package/templates/node-cli-legacy/src/cli.ts +45 -0
- package/templates/node-cli-legacy/src/config.ts +28 -0
- package/templates/node-cli-legacy/src/index.ts +3 -0
- package/templates/node-cli-legacy/src/types.ts +1 -0
- package/templates/node-cli-legacy/src/utils.ts +5 -0
- package/templates/node-cli-legacy/tsconfig.json +4 -0
- package/templates/node-cli-legacy/tsup.config.ts +18 -0
- package/templates/node-cli-legacy/xxx.config.cjs +0 -0
- package/templates/node-vite-plugin/package.json +19 -0
- package/templates/node-vite-plugin/src/index.ts +10 -0
- package/templates/node-vite-plugin/src/types.ts +1 -0
- package/templates/node-vite-plugin/test/index.test.ts +7 -0
- package/templates/node-vite-plugin/tsconfig.json +4 -0
- package/templates/node-vite-plugin/tsup.config.ts +18 -0
- package/templates/node-workspaces/package.json +10 -0
- package/templates/react/index.html +14 -0
- package/templates/react/package.json +12 -0
- package/templates/react/public/vite.svg +1 -0
- package/templates/react/src/App.css +42 -0
- package/templates/react/src/App.tsx +32 -0
- package/templates/react/src/assets/react.svg +1 -0
- package/templates/react/src/index.css +69 -0
- package/templates/react/src/main.tsx +11 -0
- package/templates/react/src/vite-env.d.ts +1 -0
- package/templates/react/vite.config.ts +7 -0
- package/templates/schema.json +110 -0
- package/templates/vscode/.vscode/extensions.json +5 -0
- package/templates/vscode/.vscode/launch.json +21 -0
- package/templates/vscode/.vscode/settings.json +3 -0
- package/templates/vscode/.vscode/tasks.json +36 -0
- package/templates/vscode/.vscodeignore +72 -0
- package/templates/vscode/LICENSE +21 -0
- package/templates/vscode/README.md +3 -0
- package/templates/vscode/_gitignore +63 -0
- package/templates/vscode/locales/en.json +5 -0
- package/templates/vscode/locales/zh-CN.json +5 -0
- package/templates/vscode/locales/zh-TW.json +5 -0
- package/templates/vscode/package.json +57 -0
- package/templates/vscode/resources/logo.png +0 -0
- package/templates/vscode/src/index.ts +15 -0
- package/templates/vscode/tsconfig.json +5 -0
- package/templates/vscode/tsup.config.ts +13 -0
- package/templates/vscode-react/README.md +3 -0
- package/templates/vscode-react/index.html +14 -0
- package/templates/vscode-react/package.json +1 -0
- package/templates/vscode-react/src/App.css +7 -0
- package/templates/vscode-react/src/App.tsx +51 -0
- package/templates/vscode-react/src/main.tsx +9 -0
- package/templates/vscode-react/src/utils/index.ts +1 -0
- package/templates/vscode-react/src/utils/vscode.ts +83 -0
- package/templates/vscode-react/src/vite-env.d.ts +1 -0
- package/templates/vscode-react/vite.config.ts +20 -0
- package/templates/vscode-vue/README.md +3 -0
- package/templates/vscode-vue/index.html +14 -0
- package/templates/vscode-vue/package.json +6 -0
- package/templates/vscode-vue/src/App.vue +58 -0
- package/templates/vscode-vue/src/main.ts +4 -0
- package/templates/vscode-vue/src/utils/index.ts +1 -0
- package/templates/vscode-vue/src/utils/vscode.ts +83 -0
- package/templates/vscode-vue/src/vite-env.d.ts +1 -0
- package/templates/vscode-vue/vite.config.ts +29 -0
- package/templates/vue/electron/main/index.ts +123 -0
- package/templates/vue/index.html +14 -0
- package/templates/vue/package.json +12 -0
- package/templates/vue/public/vite.svg +1 -0
- package/templates/vue/src/App.vue +32 -0
- package/templates/vue/src/assets/vue.svg +1 -0
- package/templates/vue/src/components/HelloWorld.vue +37 -0
- package/templates/vue/src/main.ts +6 -0
- package/templates/vue/src/style.css +80 -0
- package/templates/vue/src/vite-env.d.ts +1 -0
- package/templates/vue/vite.config.ts +7 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import HelloWorld from './components/HelloWorld.vue';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<div>
|
|
7
|
+
<a href="https://vitejs.dev" target="_blank">
|
|
8
|
+
<img src="/vite.svg" class="logo" alt="Vite logo" />
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://vuejs.org/" target="_blank">
|
|
11
|
+
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
|
|
12
|
+
</a>
|
|
13
|
+
</div>
|
|
14
|
+
<HelloWorld msg="Vite + Vue" />
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<style scoped>
|
|
18
|
+
.logo {
|
|
19
|
+
height: 6em;
|
|
20
|
+
padding: 1.5em;
|
|
21
|
+
will-change: filter;
|
|
22
|
+
transition: filter 300ms;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.logo:hover {
|
|
26
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.logo.vue:hover {
|
|
30
|
+
filter: drop-shadow(0 0 2em #42b883aa);
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
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="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
defineProps<{ msg: string }>();
|
|
5
|
+
|
|
6
|
+
const count = ref(0);
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<h1>{{ msg }}</h1>
|
|
11
|
+
|
|
12
|
+
<div class="card">
|
|
13
|
+
<button type="button" @click="count++">count is {{ count }}</button>
|
|
14
|
+
<p>
|
|
15
|
+
Edit
|
|
16
|
+
<code>components/HelloWorld.vue</code> to test HMR
|
|
17
|
+
</p>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<p>
|
|
21
|
+
Check out
|
|
22
|
+
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank">create-vue</a>, the
|
|
23
|
+
official Vue + Vite starter
|
|
24
|
+
</p>
|
|
25
|
+
<p>
|
|
26
|
+
Install
|
|
27
|
+
<a href="https://github.com/vuejs/language-tools" target="_blank">Volar</a>
|
|
28
|
+
in your IDE for a better DX
|
|
29
|
+
</p>
|
|
30
|
+
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<style scoped>
|
|
34
|
+
.read-the-docs {
|
|
35
|
+
color: #888;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
+
line-height: 1.5;
|
|
4
|
+
font-weight: 400;
|
|
5
|
+
|
|
6
|
+
color-scheme: light dark;
|
|
7
|
+
color: rgba(255, 255, 255, 0.87);
|
|
8
|
+
background-color: #242424;
|
|
9
|
+
|
|
10
|
+
font-synthesis: none;
|
|
11
|
+
text-rendering: optimizeLegibility;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
-webkit-text-size-adjust: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
a {
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
color: #646cff;
|
|
20
|
+
text-decoration: inherit;
|
|
21
|
+
}
|
|
22
|
+
a:hover {
|
|
23
|
+
color: #535bf2;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
margin: 0;
|
|
28
|
+
display: flex;
|
|
29
|
+
place-items: center;
|
|
30
|
+
min-width: 320px;
|
|
31
|
+
min-height: 100vh;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
h1 {
|
|
35
|
+
font-size: 3.2em;
|
|
36
|
+
line-height: 1.1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
button {
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
border: 1px solid transparent;
|
|
42
|
+
padding: 0.6em 1.2em;
|
|
43
|
+
font-size: 1em;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
font-family: inherit;
|
|
46
|
+
background-color: #1a1a1a;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition: border-color 0.25s;
|
|
49
|
+
}
|
|
50
|
+
button:hover {
|
|
51
|
+
border-color: #646cff;
|
|
52
|
+
}
|
|
53
|
+
button:focus,
|
|
54
|
+
button:focus-visible {
|
|
55
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.card {
|
|
59
|
+
padding: 2em;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#app {
|
|
63
|
+
max-width: 1280px;
|
|
64
|
+
margin: 0 auto;
|
|
65
|
+
padding: 2rem;
|
|
66
|
+
text-align: center;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (prefers-color-scheme: light) {
|
|
70
|
+
:root {
|
|
71
|
+
color: #213547;
|
|
72
|
+
background-color: #ffffff;
|
|
73
|
+
}
|
|
74
|
+
a:hover {
|
|
75
|
+
color: #747bff;
|
|
76
|
+
}
|
|
77
|
+
button {
|
|
78
|
+
background-color: #f9f9f9;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|