Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Better integration of `detective` #51

fb55 opened this Issue Aug 24, 2012 · 2 comments


None yet
3 participants

fb55 commented Aug 24, 2012

I've been working on one of my own projects, htmlparser2, lately, and I was remembered that I decided to use conditional loading for certain parts of the module. Especially the index.js file wouldn't work when using require-analyzer.

The easiest fix would require the following steps:

  • detective should be run for every single file, not just when an error occurs inside a worker.
  • It shouldn't be run inside the worker.
  • All files that detective reports should also be checked (as long as they aren't inside a node_modules directory).

require-analyzer's speed could also be greatly improved by only starting a worker when require is called with arguments other than strings.


I've been meaning to do this kind of a large-scale refactor of require-analyzer for a long time, but haven't gotten around to it. If you've got the time and would like to take a crack at this refactor yourself, please do.

That was fixed by #52.

@mmalecki mmalecki closed this Aug 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment