Skip to content

Commit

Permalink
Merge pull request #2 from ronanru/main
Browse files Browse the repository at this point in the history
fix: scaffold script doesn't work for packages with dots in the name
  • Loading branch information
thepassle authored Jul 17, 2024
2 parents 12c9c52 + 94cacf7 commit e62a349
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/scaffold-codemod.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import jscodeshift from 'jscodeshift';
const name = process.argv[2];

/** @param {string} s */
const camelize = (s) => s.replace(/-./g, (x) => x[1].toUpperCase());
const camelize = (s) => s.replace(/[-\.]./g, (x) => x[1].toUpperCase());

fs.mkdirSync(`./test/fixtures/${name}/case-1`, { recursive: true });
fs.writeFileSync(
Expand All @@ -38,7 +38,7 @@ fs.writeFileSync(
*/
/**
* @param {CodemodOptions} [options]
* @param {CodemodOptions} [options]
* @returns {Codemod}
*/
export default function(options) {
Expand Down

0 comments on commit e62a349

Please sign in to comment.