--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
Thanks!
-Karl Tiedt
Looks like a terrible practice. It just obfuscates code for no apparent reason other than doing just that.
Am I missing something? Is there something you can solve with this that you cannot solve by just creating a bin file that requires your library?
But sniffing `require.main === module` is fine, too.
Is there any way to get this information other than shelling out to
the `df` executable?
You can have a bin and install something locally as well. You can
also have more than one javascript file in your npm package. Just
list one as a bin and the other as the main.
Is there any way to get this information other than shelling out to
the `df` executable?
Well, you can't require() stuff that's installed globally, that's
true. You'd just install it in the appropriate place based on what
you intend to do with it, or install/link it in both places if you
want to do both things.
Nice, thanks David, I googled but nothing came up, I'll definitely check it out