codemod
codemod copied to clipboard
Make package executeable
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.
In the MoT meetup today someone suggested to make this part of the schematic to allow things like:
$ ng e2e migrate ./specs/**.spec.js