serby/compact — pull request #9 by bengourley (2012-05-22 11:34:54+00:00)
Title: Precedence issue

When adding a `srcPath` for a namespace, the lookup should prefer this path to the 'default' path.

If you have `a.js` in `srcPath` and `a.js` in an added `srcPath`, currently the first `a.js` is retrieved. It should be the other way around.

I think you meant to do this in your code, but you put `continue` instead of `break` within the loop, which meant it carried on searching even though a match was found.

I have added a test for this case.