@@ -131,7 +131,7 @@ test('renders ${componentName}', () => {
131
131
fs .writeFileSync (componentLocation, this .writeRenderUnitTestString (componentName, componentMap[componentName].htmlList ))
132
132
},
133
133
134
- createComponentCode (componentLocation , componentName , children ) {
134
+ createComponentCode (componentLocation , componentName , children , routes ) {
135
135
if (componentName === " App" ) {
136
136
fs .writeFileSync (
137
137
componentLocation + " .vue" ,
@@ -232,10 +232,9 @@ test('renders ${componentName}', () => {
232
232
let htmlArr = this .componentMap [componentName].htmlList ;
233
233
let outputStr = ` ` ;
234
234
// eslint-disable-next-line no-unused-vars
235
- for (let i = 0 ; i < htmlArr .length ; i++ ) {
236
- const el = htmlArr[i];
235
+ for (let el of htmlArr) {
237
236
if (! el .text ) {
238
- outputStr += ` <${ el} />\n ` ;
237
+ outputStr += ` <${ el} />\n ` ;
239
238
} else {
240
239
outputStr += ` ` ;
241
240
outputStr += htmlElementMap[el .text ][0 ];
@@ -257,8 +256,8 @@ test('renders ${componentName}', () => {
257
256
outputStr += htmlElementMap[el .text ][1 ] + " \n " ;
258
257
}
259
258
}
260
- return outputStr;
261
259
}
260
+ return outputStr;
262
261
},
263
262
writeComments (componentName ) {
264
263
if (this .componentMap [componentName]? .noteList ? .length > 0 ) {
@@ -518,22 +517,6 @@ test('renders ${componentName}', () => {
518
517
</style >`
519
518
} else return ` \n\n <style scoped>\n ${ styleString} </style >` ;
520
519
},
521
- // create Babel config for testing
522
- createBabelConfigFile (location ) {
523
- let str = `
524
- module.exports = {
525
- presets: [
526
- ['@babel/preset-env',
527
- {
528
- targets: {
529
- node: 'current'
530
- }
531
- }
532
- ]
533
- ]
534
- }`
535
- fs .writeFileSync (path .join (location, " babel.config.js" ), str);
536
- },
537
520
// create Firebase config for OAuth
538
521
createFirebaseConfigFile (location ) {
539
522
if (this .$store .state .exportOauth === ' on' ){
@@ -688,7 +671,6 @@ module.exports = {
688
671
fs .writeFileSync (path .join (location, " src" , " main.js" ), str);
689
672
}
690
673
},
691
- // create babel file
692
674
createViteConfig (location ) {
693
675
let str = ` import { fileURLToPath, URL } from 'url';\n\n ` ;
694
676
str += ` import { defineConfig } from 'vite';\n ` ;
0 commit comments