Skip to content

Instantly share code, notes, and snippets.

module.exports = function transformer(file, api) {
const j = api.jscodeshift;
const ast = j(file.source);
ast.find(j.CallExpression, {
callee: {
name: 'define'
}
}).forEach(path => {
const args = path.node.arguments;
module.exports = function transformer(file, api) {
const j = api.jscodeshift;
const ast = j(file.source);
ast.find(j.CallExpression, {
callee: {
name: 'require'
}
}).forEach(path => {
const args = path.node.arguments;