codemod icon indicating copy to clipboard operation
codemod copied to clipboard

Make package executeable

Open christian-bromann opened this issue 4 years ago • 1 comments

Rather than calling jscodeshift directly, e.g.:

$ npx jscodeshift -t ./node_modules/@wdio/codemod/protractor ./e2e/

It would be nicer to have a binary exposed that allows us to be more flexible with the codemod execution, e.g. to migrate from v5 to v7 it would be great to just having to call:

$ npx codemod v6 v7

which then calls jscodeshift seperately.

Also the package should automatically detect the files and pick e.g. TypeScript as parser if all files are written that way.

christian-bromann avatar Apr 27 '21 13:04 christian-bromann

In the MoT meetup today someone suggested to make this part of the schematic to allow things like:

$ ng e2e migrate ./specs/**.spec.js

christian-bromann avatar May 11 '21 21:05 christian-bromann