mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
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:
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 };
|
||||
|
||||
Reference in new issue
Block a user