webdriverio / codemod

A codemod to transform Protractor into WebdriverIO tests
MIT License
25 stars 12 forks source link

Make package executeable #11

Open christian-bromann opened 3 years ago

christian-bromann commented 3 years ago

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 commented 3 years ago

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

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