Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit 6a1bf87

Browse files
committed
fix(templates): correct hello world cmp name. update router conditional.
1 parent cb462dc commit 6a1bf87

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

packages/vue-cli-plugin-vuetify/generator/templates/v3/src/components/HelloWorld.js.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
import logo from '../assets/logo.svg';
100100
101101
export default {
102-
name: 'Playground',
102+
name: 'HelloWorld',
103103
104104
data: () => ({
105105
ecosystem: [

packages/vue-cli-plugin-vuetify/generator/templates/v3/src/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@ import App from './App.vue'
44
<%_ if (router) { _%>
55
import router from './router'
66
<%_ } _%>
7+
<%_ if (store) { _%>
8+
import store from './store'
9+
<%_ } _%>
710

811
const app = createApp(App)
912
<%_ if (router) { _%>
1013
app.use(router)
1114
<%_ } _%>
15+
<%_ if (store) { _%>
16+
app.use(store)
17+
<%_ } _%>
1218
app.use(vuetify)
1319

1420
app.mount('#app')
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
const fs = require('fs');
2+
3+
function addDependencies(api) {
4+
api.extendPackage({
5+
devDependencies: {
6+
'@vitejs/plugin-vue': '^1.1.5',
7+
'@vitejs/plugin-vue': '^1.1.5',
8+
},
9+
scripts: {
10+
'serve': 'vite preview',
11+
'build': 'vite build',
12+
'dev': 'vite',
13+
}
14+
})
15+
}
16+
17+
function renderFiles(api, opts) {
18+
fs.unlinkSync('./src/')
19+
}

packages/vue-cli-plugin-vuetify/generator/tools/vuetify.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ function renderFiles (api, { opts }) {
3030
// Render files if we're replacing
3131
const fs = require('fs')
3232
const routerPath = api.resolve(`./src/router.${ext}`)
33+
const storePath = api.resolve(`./src/store.${ext}`)
3334
opts.router = fs.existsSync(routerPath)
35+
opts.store = fs.existsSync(storePath)
3436

3537
let files = {
3638
"./src/App.vue": `../templates/default/src/App.${ext}.vue`,

0 commit comments

Comments
 (0)