Skip to content

Commit 7afa467

Browse files
add fontawesome pro/free and /lib vuetify
1 parent 7991026 commit 7afa467

File tree

5 files changed

+32
-6
lines changed

5 files changed

+32
-6
lines changed

generator/index.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@ module.exports = (api, options) => {
77
'axios': '^0.18.0',
88
'vuex': '^3.1.0',
99
'vuex-persistedstate': '^2.5.4',
10-
'@fortawesome/fontawesome-pro': '^5.8.1',
1110
'lodash.clonedeep': '^4.5.0',
1211
'css-vars-ponyfill': '^2.1.2',
1312
},
14-
})
13+
});
14+
if (options.plugins.includes('fontawesomepro')) {
15+
api.extendPackage({
16+
dependencies: {
17+
'@fortawesome/fontawesome-pro': '^5.8.1',
18+
},
19+
});
20+
}
1521

1622
if (options.useCrud) {
1723
api.extendPackage({
1824
dependencies: {
19-
'@kingscode/vuetify-resource': '^1.1.0',
25+
'@kingscode/vuetify-resource': '^1.1.2',
2026
},
2127
});
2228
api.render('./templates/Crud', options);

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import Vue from 'vue';
2-
import Vuetify from 'vuetify';
2+
import Vuetify from 'vuetify/lib';
3+
<%_ if (options.plugins.includes('fontawesomepro')){ _%>
34
import '@fortawesome/fontawesome-pro/css/all.css';
4-
import 'vuetify/dist/vuetify.min.css';
5+
<%_ } _%>
56
import nl from 'vuetify/es5/locale/nl';
67

78
Vue.use(Vuetify);
89
export default new Vuetify({
910
icons: {
1011
iconfont: 'fa',
12+
<%_ if (options.plugins.includes('fontawesomepro')){ _%>
1113
values: {
1214
'close': 'far fa-times',
1315
'menu': 'far fa-bars',
@@ -16,6 +18,16 @@ export default new Vuetify({
1618
'edit': 'far fa-pencil-alt',
1719
'search': 'far fa-search',
1820
},
21+
<%_ } else { _%>
22+
values: {
23+
'close': 'fas fa-times',
24+
'menu': 'fas fa-bars',
25+
'delete': 'fas fa-trash-alt',
26+
'add': 'fas fa-plus',
27+
'edit': 'fas fa-pencil-alt',
28+
'search': 'fas fa-search',
29+
},
30+
<%_ } _%>
1931
},
2032
customProperties: true,
2133
lang: {

generator/templates/Default/vue.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
module.exports = {
2+
'transpileDependencies': [
3+
'vuetify',
4+
],
25
publicPath: process.env.VUE_APP_PUBLIC_PATH,
36
pwa: {
47
workboxPluginMode: 'GenerateSW',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-cli-plugin-kingscode-scaffold",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

prompts.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ module.exports = [
3636
name: 'Google Analytics with vue-analytics',
3737
checked: true,
3838
},
39+
{
40+
value: 'fontawesomepro',
41+
name: 'Font awesome pro',
42+
checked: false,
43+
},
3944
],
4045
},
4146
{

0 commit comments

Comments
 (0)