@@ -8,7 +8,8 @@ module.exports = (api, options) => {
88 'vuex' : '^3.1.0' ,
99 'vuex-persistedstate' : '^2.5.4' ,
1010 '@fortawesome/fontawesome-pro' : '^5.8.1' ,
11- "lodash.clonedeep" : "^4.5.0" ,
11+ 'lodash.clonedeep' : '^4.5.0' ,
12+ 'css-vars-ponyfill' : '^2.1.2' ,
1213 } ,
1314 } ) ;
1415 if ( options . useCrud ) {
@@ -17,32 +18,45 @@ module.exports = (api, options) => {
1718 '@kingscode/vuetify-resource' : '^1.1.0' ,
1819 } ,
1920 } ) ;
20- api . render ( './templates/Crud' , {
21- ...options ,
22- } ) ;
21+ api . render ( './templates/Crud' , options ) ;
2322 }
2423
25- api . render ( './templates/Default' , {
26- ...options ,
27- } ) ;
24+ api . render ( './templates/Default' , options ) ;
2825
2926 if ( options . useAuthorisation ) {
30- api . render ( './templates/Authorisation' , {
31- ...options ,
27+ api . render ( './templates/Authorisation' , options ) ;
28+ }
29+
30+ if ( options . plugins . includes ( 'sentry' ) ) {
31+ api . extendPackage ( {
32+ dependencies : {
33+ '@sentry/browser' : '^5.8.0' ,
34+ '@sentry/integrations' : '^5.8.0' ,
35+ } ,
36+ } ) ;
37+ api . render ( './templates/Plugins/sentry' , options ) ;
38+ }
39+
40+ if ( options . plugins . includes ( 'analytics' ) ) {
41+ api . extendPackage ( {
42+ dependencies : {
43+ 'vue-analytics' : '^5.17.4' ,
44+ } ,
3245 } ) ;
46+ api . render ( './templates/Plugins/analytics' , options ) ;
3347 }
3448
3549 api . onCreateComplete ( ( ) => {
36- if ( fs . existsSync ( 'src/store.js' ) ) {
50+ if ( fs . existsSync ( 'src/store.js' ) ) {
3751 fs . unlinkSync ( api . resolve ( 'src/store.js' ) ) ;
3852 }
39- if ( fs . existsSync ( 'src/assets/logo.svg' ) ) {
53+ if ( fs . existsSync ( 'src/assets/logo.svg' ) ) {
4054 fs . unlinkSync ( api . resolve ( 'src/assets/logo.svg' ) ) ;
4155 }
42- if ( fs . existsSync ( 'src/components/HelloWorld.vue' ) ) {
56+ if ( fs . existsSync ( 'src/components/HelloWorld.vue' ) ) {
4357 fs . unlinkSync ( api . resolve ( 'src/components/HelloWorld.vue' ) ) ;
4458 }
45- if ( fs . existsSync ( 'src/main.js' ) ) {
59+ if ( fs . existsSync ( 'src/main.js' ) ) {
4660 fs . unlinkSync ( api . resolve ( 'src/main.js' ) ) ;
4761 }
4862 fs . renameSync ( api . resolve ( 'src/newmain.js' ) , api . resolve ( 'src/main.js' ) ) ;
0 commit comments