-
-
-
-
-
-
-
-
-
- 4 more replies
New conversation -
-
-
@wycats How would you differentiate from require('mypkg/test/shared/file.js')? What make "lib" so special? File system >>> convention -
@indexzero what makes node_modules special? -
@wycats I see what you did there, but won't fall for it. You can't answer my question with a question. Answer, or don't answer. Don't troll. -
@indexzero I wasn't trolling. After the heated discussion last night I was shocked to find that node_modules did exactly what I needed -
@wycats And you avoid the question again. Bravo. Can't make one non-npm dir special or everything else breaks like require('pkg/test/file');
End of conversation
New conversation -
-
-
@wycats perhaps it's a naming convention problem? E.g., ./lib for app specific stuff, ./modules for exposed `require('thing/modules/foo')` -
@danheberden this is just f***ed, but so be it. -
@wycats@danheberden you used to be able to do that, but it was removed because it's simpler without that "feature".
End of conversation
New conversation -
-
-
@wycats See: http://package.json.nodejitsu.com/ , main determines which file is loaded when using require('mypackage') -
@percyhanna I am looking for a way to do require("mypackage/foo") but store that file in mypackage/lib/foo.js -
@wycats Not that I'm aware of, unless you create a ./foo.js "manifest" that just loads files from ./lib/. But is that worth the extra file?
End of conversation
New conversation -
-
-
@wycats Put your files in the root of your package, expose them as a root object, or split them up into separate packages like a gentleman.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.