This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This codemod expects 2 CLI arguments: | |
* - packageDir: the path of the directory containing the package.json. It's used to detect whether a path points | |
* to a dependency or an internal module. | |
* - rootDirs: root directory paths separated by a comma if you have more than one root. | |
* Let's say that you have two files: | |
* - src/component.js | |
* - src/index.js containing the import "import Component from 'component.js';" | |
* To have the transformation successfully working you need to call jscodeshift with the "--rootDirs ./src" argument. | |
*/ |