JSCodeHinting - Find requirejs modules even when project root doesn't match the requirejs root.

Looks for any files that end with the name of the module we're looking for.  Does not do any tie breaking yet, but this gets the requirejs support working when you open the 'brackets' dir for instance, instead of the 'brackets/src' dir.
This commit is contained in:
Erik Tierney committed 2013-04-23 13:14:16 -04:00
1 parent 92d19a2788
commit 6c0a350176
2 files changed
+58 -18

No files matched your search

@@ -102,7 +102,7 @@ define(function (require, exports, module) {
*/
function splitPath(path) {
var index = path.lastIndexOf("/"),
dir = path.substring(0, index),
dir = (index === -1) ? "" : path.substring(0, index),
file = path.substring(index + 1, path.length);
return {dir: dir, file: file };