File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @codeshift/initializer ' : patch
3
+ ---
4
+
5
+ Fix output dir path
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export function initDirectory(
100
100
packageName : string ,
101
101
transform : string ,
102
102
type : 'version' | 'preset' ,
103
- path : string = './' ,
103
+ targetPath : string = './' ,
104
104
isReduced : boolean = false ,
105
105
) {
106
106
if ( type === 'version' && ! semver . valid ( transform ) ) {
@@ -109,7 +109,7 @@ export function initDirectory(
109
109
) ;
110
110
}
111
111
112
- const basePath = `${ path } /${ packageName . replace ( '/' , '__' ) } ` ;
112
+ const basePath = `${ targetPath } /${ packageName . replace ( '/' , '__' ) } ` ;
113
113
const transformPath = `${ basePath } ${ ! isReduced ? '/src/' : '' } /${ transform } ` ;
114
114
const configPath = `${ basePath } ${
115
115
! isReduced ? '/src' : ''
@@ -121,7 +121,7 @@ export function initDirectory(
121
121
122
122
fs . copySync ( `${ __dirname } /../template${ isReduced ? '/src' : '' } ` , basePath ) ;
123
123
fs . renameSync (
124
- `${ basePath } ${ ! isReduced ? '/src/ ' : '' } /codemod` ,
124
+ `${ basePath } ${ ! isReduced ? '/src' : '' } /codemod` ,
125
125
transformPath ,
126
126
) ;
127
127
You can’t perform that action at this time.
0 commit comments