Like node-detective, but for AMD/r.js files