File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -6,13 +6,7 @@ module.exports = (api) => {
66 'vue-extensionpoints' : '^0.1.4' ,
77 } ,
88 } )
9- const appPath = api . resolve ( 'src/App.vue' )
10- if ( fs . existsSync ( appPath ) ) {
11- let content = fs . readFileSync ( appPath , { encoding : 'utf8' } )
12- content = content . replace ( / H e l l o W o r l d / gi, 'ExtensionpointExample' )
13- fs . writeFileSync ( appPath , content , { encoding : 'utf8' } )
14- }
15- api . render ( './template' )
9+ api . render ( './template' ) ;
1610
1711 // add import
1812 api . injectImports ( api . entryFile ,
@@ -34,5 +28,12 @@ module.exports.hooks = (api) => {
3428 lines [ renderIndex ] = `Vue.use(Extensionpoints, plugins)${ EOL } ${ EOL } ` + lines [ renderIndex ]
3529 fs . writeFileSync ( api . entryFile , lines . join ( EOL ) , { encoding : 'utf-8' } )
3630 }
31+
32+ const appPath = api . resolve ( 'src/App.vue' )
33+ if ( fs . existsSync ( appPath ) ) {
34+ let content = fs . readFileSync ( appPath , { encoding : 'utf8' } )
35+ content = content . replace ( / H e l l o W o r l d / gi, 'ExtensionpointExample' )
36+ fs . writeFileSync ( appPath , content )
37+ }
3738 } )
3839}
You can’t perform that action at this time.
0 commit comments