Closed vitorbal closed 8 years ago
LGTM
@vitorbal does this fix #2? If so, can you update the commit message to say "fixes #2" instead of "refs #2"?
@nzakas the first commit does not fix #2, only part of the problem, that's why I chose to use "refs".
I just pushed a second commit that does indeed fix #2 entirely. It does away with the shelljs-nodecli
package in favor of the approach described in your blog post (thanks again for the link!).
The bin should now be able to find jscodeshift if eslint-transforms is installed globally or locally, and also if dependencies are flattened. Let me know if the code makes sense from your perspective!
The executable was not using
__dirname
to look for the transforms before, which was causing it to error out when installed through npm (See #2). This PR should fix the issue.