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

Commit cbbef97

Browse files
committed
fix broken hello world component
1 parent 0aec846 commit cbbef97

File tree

5 files changed

+10589
-56
lines changed

5 files changed

+10589
-56
lines changed

README.md

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# vue-cli-plugin-vuetify
2-
Plugin for vue-cli@3.0
32

4-
If you want to try out the new vue-cli 3 to make an app using Vuetify, this plugin will set up Vuetify hassle-free.
3+
Vuetify Plugin for [vue-cli@3.0](https://github.com/vuejs/vue-cli)
54

65
## Install
76

@@ -21,4 +20,68 @@ To install the vuetify plugin...
2120
vue add vuetify
2221
```
2322

24-
That's it! Let us know what you think on [discord](https://discordapp.com/channels/340160225338195969/340160225338195969).
23+
If you run into any issues you can hit us up on [discord/need](https://discordapp.com/channels/340160225338195969/340215499398840331).
24+
25+
## Using with other plugins
26+
27+
Here are some extra steps for setting up the old templates but using plugins from the new ecosystem.
28+
29+
## Nuxt
30+
31+
```
32+
# preset: default (babel, eslint)
33+
34+
vue add nuxt-starter-template
35+
36+
```
37+
38+
Todo
39+
40+
- Add vuetify Nuxt starter template
41+
42+
43+
### Electron
44+
45+
Just add [vue-cli-plugin-electron-builder](https://www.npmjs.com/package/vue-cli-plugin-electron-builder)
46+
47+
```
48+
# preset: default (babel, eslint)
49+
50+
vue add vuetify electron-builder vuetify
51+
yarn server:electron
52+
```
53+
54+
Gotcha
55+
56+
- If you add vuetify before electron-builder, electron-builder will overwrite Vuetify's App.vue and HelloWorld.vue
57+
58+
Todo
59+
60+
- material icons aren't properly included
61+
62+
### PWA
63+
64+
If you already made a project with the PWA option selected, then just adding like above should do it.
65+
66+
Otherwise...
67+
68+
Todo
69+
70+
- check if can add PWA plugin after now without old bug
71+
72+
### Cordova (not working yet)
73+
74+
https://www.npmjs.com/package/vue-cli-plugin-cordova
75+
76+
77+
Gotcha
78+
79+
- `semver module not found`
80+
- fix with `yarn add -D semver`
81+
82+
Todo
83+
84+
- can i skip `yarn cordova:build`?
85+
86+
## Typescript Support
87+

generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = (api, opts, rootOpts) => {
3636
if (opts.router) {
3737
files['./src/views/Home.vue'] = './templates/default/src/views/Home.vue'
3838
} else {
39-
files['./src/components/HelloWorld.vue'] = './templates/default/src/components/HelloWorld.vue'
39+
api.render('./templates/hw')
4040
}
4141

4242
api.render(files, opts)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
extend: '@vue/cli-service/generator/template/src/components/HelloWorld.vue'
3+
replace:
4+
- !!js/regexp /<template>[^]*?<\/template>/
5+
- !!js/regexp /<style.*>[^]*?<\/style>/
6+
---
7+
8+
<%# REPLACE %>
9+
<template>
10+
<v-container fluid>
11+
<v-slide-y-transition mode="out-in">
12+
<v-layout column align-center>
13+
<img src="@/assets/logo.png" alt="Vuetify.js" class="mb-5">
14+
<blockquote>
15+
&#8220;First, solve the problem. Then, write the code.&#8221;
16+
<footer>
17+
<small>
18+
<em>&mdash;John Johnson</em>
19+
</small>
20+
</footer>
21+
</blockquote>
22+
</v-layout>
23+
</v-slide-y-transition>
24+
</v-container>
25+
</template>
26+
<%# END_REPLACE %>
27+
28+
<%# REPLACE %>
29+
<!-- Add "scoped" attribute to limit CSS to this component only -->
30+
<style scoped>
31+
h1, h2 {
32+
font-weight: normal;
33+
}
34+
ul {
35+
list-style-type: none;
36+
padding: 0;
37+
}
38+
li {
39+
display: inline-block;
40+
margin: 0 10px;
41+
}
42+
a {
43+
color: #42b983;
44+
}
45+
</style>
46+
<%# END_REPLACE %>

0 commit comments

Comments
 (0)