@@ -131,7 +131,7 @@ test('renders ${componentName}', () => {
131131 fs .writeFileSync (componentLocation, this .writeRenderUnitTestString (componentName, componentMap[componentName].htmlList ))
132132 },
133133
134- createComponentCode (componentLocation , componentName , children ) {
134+ createComponentCode (componentLocation , componentName , children , routes ) {
135135 if (componentName === " App" ) {
136136 fs .writeFileSync (
137137 componentLocation + " .vue" ,
@@ -232,10 +232,9 @@ test('renders ${componentName}', () => {
232232 let htmlArr = this .componentMap [componentName].htmlList ;
233233 let outputStr = ` ` ;
234234 // 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) {
237236 if (! el .text ) {
238- outputStr += ` <${ el} />\n ` ;
237+ outputStr += ` <${ el} />\n ` ;
239238 } else {
240239 outputStr += ` ` ;
241240 outputStr += htmlElementMap[el .text ][0 ];
@@ -257,8 +256,8 @@ test('renders ${componentName}', () => {
257256 outputStr += htmlElementMap[el .text ][1 ] + " \n " ;
258257 }
259258 }
260- return outputStr;
261259 }
260+ return outputStr;
262261 },
263262 writeComments (componentName ) {
264263 if (this .componentMap [componentName]? .noteList ? .length > 0 ) {
@@ -518,22 +517,6 @@ test('renders ${componentName}', () => {
518517</style >`
519518 } else return ` \n\n <style scoped>\n ${ styleString} </style >` ;
520519 },
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- },
537520 // create Firebase config for OAuth
538521 createFirebaseConfigFile (location ) {
539522 if (this .$store .state .exportOauth === ' on' ){
@@ -688,7 +671,6 @@ module.exports = {
688671 fs .writeFileSync (path .join (location, " src" , " main.js" ), str);
689672 }
690673 },
691- // create babel file
692674 createViteConfig (location ) {
693675 let str = ` import { fileURLToPath, URL } from 'url';\n\n ` ;
694676 str += ` import { defineConfig } from 'vite';\n ` ;
0 commit comments