File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,19 @@ function main(packageName: string, version: string) {
2020 const codemodBasePath = `${ communityDirectoryPath } /${ safePackageName } ` ;
2121 const codemodPath = `${ codemodBasePath } /${ version } ` ;
2222 const configPath = `${ codemodBasePath } /codeshift.config.js` ;
23- const testPath = `${ codemodPath } /_tests_` ;
23+ const testsPath = `${ codemodPath } /_tests_` ;
24+ const motionsPath = `${ codemodPath } /motions` ;
2425
2526 fs . mkdirSync ( codemodPath , { recursive : true } ) ;
26- fs . copySync ( `${ __dirname } /../template/_tests_` , testPath ) ;
27+ fs . copySync ( `${ __dirname } /../template/motions` , motionsPath ) ;
28+ fs . copySync ( `${ __dirname } /../template/_tests_` , testsPath ) ;
2729
2830 const testFile = fs
29- . readFileSync ( `${ testPath } /transform.spec.ts` , 'utf8' )
31+ . readFileSync ( `${ testsPath } /transform.spec.ts` , 'utf8' )
3032 . replace ( '<% packageName %>' , packageName )
3133 . replace ( '<% version %>' , version ) ;
3234
33- fs . writeFileSync ( `${ testPath } /transform.spec.ts` , testFile ) ;
35+ fs . writeFileSync ( `${ testsPath } /transform.spec.ts` , testFile ) ;
3436
3537 if ( ! fs . existsSync ( configPath ) ) {
3638 fs . writeFileSync (
You can’t perform that action at this time.
0 commit comments