Skip to content

Commit

Permalink
chore: update script
Browse files Browse the repository at this point in the history
  • Loading branch information
thepassle committed Aug 7, 2024
1 parent 0537ece commit f4466a1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ import typedArrayLength from './codemods/typed-array-length/index.js';
import typedarrayPrototypeSlice from './codemods/typedarray.prototype.slice/index.js';
import xtend from './codemods/xtend/index.js';


/**
* @typedef {import('./types.js').Codemod} Codemod
* @typedef {import('./types.js').CodemodOptions} CodemodOptions
Expand Down
11 changes: 10 additions & 1 deletion scripts/generate-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ const folders = fs
.readdirSync('./codemods')
.filter((f) => fs.statSync(`./codemods/${f}`).isDirectory());

let obj = `export const codemods = {\n`;
let obj = `
/**
* @typedef {import('./types.js').Codemod} Codemod
* @typedef {import('./types.js').CodemodOptions} CodemodOptions
*/
/**
* @type {Record<string, (options: CodemodOptions) => Codemod>}
*/
export const codemods = {\n`;
let imports = ``;
const seenImports = new Set();

Expand Down

0 comments on commit f4466a1

Please sign in to comment.