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(
100100 packageName : string ,
101101 transform : string ,
102102 type : 'version' | 'preset' ,
103- path : string = './' ,
103+ targetPath : string = './' ,
104104 isReduced : boolean = false ,
105105) {
106106 if ( type === 'version' && ! semver . valid ( transform ) ) {
@@ -109,7 +109,7 @@ export function initDirectory(
109109 ) ;
110110 }
111111
112- const basePath = `${ path } /${ packageName . replace ( '/' , '__' ) } ` ;
112+ const basePath = `${ targetPath } /${ packageName . replace ( '/' , '__' ) } ` ;
113113 const transformPath = `${ basePath } ${ ! isReduced ? '/src/' : '' } /${ transform } ` ;
114114 const configPath = `${ basePath } ${
115115 ! isReduced ? '/src' : ''
@@ -121,7 +121,7 @@ export function initDirectory(
121121
122122 fs . copySync ( `${ __dirname } /../template${ isReduced ? '/src' : '' } ` , basePath ) ;
123123 fs . renameSync (
124- `${ basePath } ${ ! isReduced ? '/src/ ' : '' } /codemod` ,
124+ `${ basePath } ${ ! isReduced ? '/src' : '' } /codemod` ,
125125 transformPath ,
126126 ) ;
127127
You can’t perform that action at this time.
0 commit comments