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) => {
6
6
'vue-extensionpoints' : '^0.1.4' ,
7
7
} ,
8
8
} )
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' ) ;
16
10
17
11
// add import
18
12
api . injectImports ( api . entryFile ,
@@ -34,5 +28,12 @@ module.exports.hooks = (api) => {
34
28
lines [ renderIndex ] = `Vue.use(Extensionpoints, plugins)${ EOL } ${ EOL } ` + lines [ renderIndex ]
35
29
fs . writeFileSync ( api . entryFile , lines . join ( EOL ) , { encoding : 'utf-8' } )
36
30
}
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
+ }
37
38
} )
38
39
}
You can’t perform that action at this time.
0 commit comments