Closed estoner closed 9 years ago
Verbose would be awesome, but it'd be rad if it always did this in the error case. In the recast.parse case, can we wrap it in a try catch and log in the catch statement? Otherwise this is great :heart:
That makes total sense. I also added a log line that explains what the the problem likely is.
:heart: thanks!
This is an (extremely simple) attempt to resolve #31.
If esprima encounters a token it doesn't like, it dies without any useful error info (not even a mention of what the token is), and the user is left with no place to start debugging. All I did was change splitFile() to log the filename it's working on, which in my case was enough to fix the issue.
Maintainers: if you'd prefer a command-line --verbose flag to trigger this and keep it less chatty in normal use, let me know. Thanks for building a super useful utility! :heart: :heart: :heart: