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

Commit 3207aab

Browse files
committed
fix: properly load opts
1 parent b26e592 commit 3207aab

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

generator/templates/default/src/App.js.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@
3333
text
3434
>
3535
<span class="mr-2">Latest Release</span>
36-
<%_ if (opts.iconFont === 'mdi') { _%>
36+
<%_ if (iconFont === 'mdi') { _%>
3737
<v-icon>mdi-open-in-new</v-icon>
38-
<%_ } else if (opts.iconFont === 'md') { _%>
38+
<%_ } else if (iconFont === 'md') { _%>
3939
<v-icon>open_in_new</v-icon>
40-
<%_ } else if (opts.iconFont === 'fa') { _%>
40+
<%_ } else if (iconFont === 'fa') { _%>
4141
<v-icon>fas fa-external-link-alt</v-icon>
42-
<%_ } else if (opts.iconFont === 'fa4') { _%>
42+
<%_ } else if (iconFont === 'fa4') { _%>
4343
<v-icon>fa-external-link</v-icon>
4444
<%_ } _%>
4545
</v-btn>
4646
</v-app-bar>
4747

4848
<v-content>
49-
<%_ if (opts.router) { _%>
49+
<%_ if (router) { _%>
5050
<router-view/>
5151
<%_ } else { _%>
5252
<HelloWorld/>
@@ -56,14 +56,14 @@
5656
</template>
5757

5858
<script>
59-
<%_ if (!opts.router) { _%>
59+
<%_ if (!router) { _%>
6060
import HelloWorld from './components/HelloWorld';
6161
<%_ } _%>
6262
6363
export default {
6464
name: 'App',
6565
66-
<%_ if (!opts.router) { _%>
66+
<%_ if (!router) { _%>
6767
components: {
6868
HelloWorld,
6969
},

generator/templates/default/src/App.ts.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,20 @@
3333
text
3434
>
3535
<span class="mr-2">Latest Release</span>
36-
<%_ if (opts.iconFont === 'mdi') { _%>
36+
<%_ if (iconFont === 'mdi') { _%>
3737
<v-icon>mdi-open-in-new</v-icon>
38-
<%_ } else if (opts.iconFont === 'md') { _%>
38+
<%_ } else if (iconFont === 'md') { _%>
3939
<v-icon>open_in_new</v-icon>
40-
<%_ } else if (opts.iconFont === 'fa') { _%>
40+
<%_ } else if (iconFont === 'fa') { _%>
4141
<v-icon>fas fa-external-link-alt</v-icon>
42-
<%_ } else if (opts.iconFont === 'fa4') { _%>
42+
<%_ } else if (iconFont === 'fa4') { _%>
4343
<v-icon>fa-external-link</v-icon>
4444
<%_ } _%>
4545
</v-btn>
4646
</v-app-bar>
4747

4848
<v-content>
49-
<%_ if (opts.router) { _%>
49+
<%_ if (router) { _%>
5050
<router-view/>
5151
<%_ } else { _%>
5252
<HelloWorld/>
@@ -57,14 +57,14 @@
5757

5858
<script lang="ts">
5959
import Vue from 'vue';
60-
<%_ if (!options.router) { _%>
60+
<%_ if (!router) { _%>
6161
import HelloWorld from './components/HelloWorld.vue';
6262
<%_ } _%>
6363
6464
export default Vue.extend({
6565
name: 'App',
6666
67-
<%_ if (!options.router) { _%>
67+
<%_ if (!router) { _%>
6868
components: {
6969
HelloWorld,
7070
},

generator/templates/default/src/plugins/vuetify.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import Vue from 'vue';
2-
<%_ if (opts.useAlaCarte) { _%>
2+
<%_ if (useAlaCarte) { _%>
33
import Vuetify from 'vuetify/lib';
44
<%_ } else { _%>
55
import Vuetify from 'vuetify';
66
import 'vuetify/dist/vuetify.min.css';
77
<%_ } _%>
8-
<%_ if (opts.locale !== 'en') { _%>
8+
<%_ if (locale !== 'en') { _%>
99
import <%= locale.replace(/-/g, '') %> from 'vuetify/<%= typescript ? 'src' : 'es5' %>/locale/<%= locale %>';
1010
<%_ } _%>
1111

1212
Vue.use(Vuetify);
1313

1414
export default new Vuetify({
15-
<%_ if (opts.useTheme) { _%>
15+
<%_ if (useTheme) { _%>
1616
theme: {
17-
<%_ if (opts.useCustomProperties) { _%>
17+
<%_ if (useCustomProperties) { _%>
1818
options: {
1919
customProperties: true,
2020
},
@@ -32,15 +32,15 @@ export default new Vuetify({
3232
},
3333
},
3434
<%_ } _%>
35-
<%_ if (opts.locale !== 'en') { _%>
35+
<%_ if (locale !== 'en') { _%>
3636
lang: {
37-
locales: { <%= opts.locale.replace(/-/g, '') %> },
37+
locales: { <%= locale.replace(/-/g, '') %> },
3838
current: '<%= locale %>',
3939
},
4040
<%_ } _%>
41-
<%_ if (opts.iconFont !== 'mdi') { _%>
41+
<%_ if (iconFont !== 'mdi') { _%>
4242
icons: {
43-
iconfont: '<%= opts.iconFont %>',
43+
iconfont: '<%= iconFont %>',
4444
},
4545
<%_ } _%>
4646
});

generator/tools/vuetify.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function addDependencies (api) {
1010
})
1111
}
1212

13-
function renderFiles (api, opts) {
13+
function renderFiles (api, { opts }) {
1414
const ext = api.hasPlugin('typescript') ? 'ts' : 'js'
1515
const pluginFilename = `vuetify.${ext}`
1616

0 commit comments

Comments
 (0)