Skip to content

Commit 9223da6

Browse files
committed
chore: update new template
1 parent e1dceb8 commit 9223da6

File tree

11 files changed

+70
-38
lines changed

11 files changed

+70
-38
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"packages/*"
88
],
99
"scripts": {
10-
"dev": "esno ./scripts/build.mjs",
10+
"build": "esno ./scripts/build.mjs",
11+
"dev": "cd vite-cli && farm build --watch",
1112
"build:docs": "turbo run build --filter=docs",
1213
"serve": "turbo run docs --parallel",
1314
"lint": "turbo run lint",

pnpm-lock.yaml

Lines changed: 30 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const watcher = chokidar.watch('file, dir, glob, or array', {
77
persistent: true
88
})
99

10-
await esbuild.build({
10+
await esbuild.build({
1111
bundle: true,
1212
entryPoints: ['vite-cli/src/index.ts'],
1313
outfile: 'vite-cli/outfile.cjs',
@@ -78,6 +78,8 @@ await esbuild.build({
7878
]
7979
})
8080

81+
82+
8183
// await esbuild.build({
8284
// bundle: true,
8385
// entryPoints: ['vite-cli/src/index.ts'],

vite-cli/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-vite-template",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"description": "",
55
"bin": {
66
"vite-app": "./outfile.cjs",
@@ -13,7 +13,7 @@
1313
"test": "echo \"Error: no test specified\" && exit 1",
1414
"copy": "esno ./scripts/dev.mjs",
1515
"build": "farm build",
16-
"build:tsup": "tsup",
16+
"build:tsup": "tsup --watch",
1717
"dev": "farm watch"
1818
},
1919
"keywords": [],
@@ -23,7 +23,7 @@
2323
"repository": "https://github.com/ErKeLost/vite-cli",
2424
"bugs": "https://github.com/ErKeLost/vite-cli/issues",
2525
"dependencies": {
26-
"prettier": "latest"
26+
"prettier": "2.8.0"
2727
},
2828
"devDependencies": {
2929
"@types/node": "^18.11.9",

vite-cli/src/core/questions/vue/components.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ export default {
44
message: 'choose UI frameWork',
55
choices: [
66
{ title: 'Element Plus', value: 'elementPlus' },
7-
{ title: 'Tiny Vue', value: 'tinyVue' },
87
{ title: 'Ant Design Vue', value: 'antDesignVue' },
98
{ title: 'Vuetify3', value: 'vuetify' },
109
{ title: 'Naive UI', value: 'naiveUI' },
1110
{ title: 'Varlet Pc', value: 'varlet' },
12-
{ title: 'DevUI', value: 'devUI' },
1311
{ title: 'arco-design', value: 'arco' },
1412
{ title: 'TDesign', value: 'tencent' },
13+
{ title: 'Tiny Vue', value: 'tinyVue' },
14+
{ title: 'DevUI', value: 'devUI' },
15+
{ title: 'TDesign', value: 'tencent' },
16+
{ title: 'Shuimo', value: 'shuimo' },
1517
{ title: 'Vant 4.x', value: 'vant' },
1618
{ title: 'tdesign-mobile-vue', value: 'tencent-mobile' }
1719
]

vite-cli/src/dependence/vue/components.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ const vant = {
9494
dev: 'pro'
9595
}
9696

97+
const shuimo = {
98+
name: 'shuimo-ui',
99+
version: '^0.3.0-alpha.7',
100+
stableVersion: '^0.3.0-alpha.7',
101+
theme: false,
102+
dev: 'pro'
103+
}
97104
export {
98105
varlet,
99106
tinyVue,
@@ -104,5 +111,6 @@ export {
104111
naiveUI,
105112
antDesignVue,
106113
elementPlus,
107-
vant
114+
vant,
115+
shuimo
108116
}

vite-cli/src/utils/ejsRender.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export async function ejsRender(filePath: string, name): Promise<void> {
2323
// 获取后缀
2424
const extname = path.extname(filePath).replace(/[.]/g, '')
2525
const opts = await prettier.resolveConfig(templatePath)
26+
2627
try {
2728
switch (extname) {
2829
case 'ts':

vite-cli/template/vue/src/assets/shuimo.svg

Lines changed: 1 addition & 0 deletions
Loading

vite-cli/template/vue/src/components/HelloWorld.ejs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
<a target="_blank" href="https://www.naiveui.com/zh-CN/os-theme"
2424
>NaiveUi</a
2525
>
26+
<% } -%> <% if (components === 'shuimo') { -%>
27+
<a target="_blank" href="https://shuimo.design/main"
28+
>Shuimo</a
29+
>
2630
<% } -%> <% if (components === 'devUI') { -%>
2731
<a target="_blank" href="https://github.com/DevCloudFE/vue-devui"
2832
>DevUI</a

vite-cli/template/vue/src/components/Welcome.ejs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ const { count } = storeToRefs(counterStore);
4141
<% if (components === 'naiveUI') { -%>
4242
<n-button type="primary">Home</n-button>
4343
<% } -%>
44+
<% if (components === 'shuimo') { -%>
45+
<m-button type="primary">Home</m-button>
46+
<% } -%>
4447
<% if (components === 'arco') { -%>
4548
<a-button type="primary">Home</a-button>
4649
<% } -%>
@@ -73,6 +76,9 @@ const { count } = storeToRefs(counterStore);
7376
<% if (components === 'tinyVue') { -%>
7477
<TinyButton type="primary">About</TinyButton>
7578
<% } -%>
79+
<% if (components === 'shuimo') { -%>
80+
<m-button type="primary">About</m-button>
81+
<% } -%>
7682
<% if (components === 'naiveUI') { -%>
7783
<n-button type="primary">About</n-button>
7884
<% } -%>

0 commit comments

Comments
 (0)