Skip to content

Commit

Permalink
Properly resolve the codemod
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaub committed Dec 14, 2024
1 parent 1b9d988 commit 593a4e7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion codemod.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ program
)
.action(async (src, _, cmd) => {
const options = cmd.optsWithGlobals();
const replaceBarrelImports = path.resolve('src/replace-barrel-imports.js');
const replaceBarrelImports = path.resolve(
__dirname,
`./src/${cmd.name()}.js`,
);

await jscodeshift(replaceBarrelImports, [src], options);
});

Expand Down

0 comments on commit 593a4e7

Please sign in to comment.