On 14/12/15 12:08, Stephen Gallagher wrote:

I'd go so far as to say that we should propose a modification to the packaging 
guidelines to state this explicitly. Would you like me to prepare a draft?

Sounds good to me.

Sometimes modules have extra entry points that can be loaded with variants of 
require in which case those could be test loaded as well.

Could you give me an example of those variants?

I was going to say readable-stream, where you can do:

  require('readable-stream/transform')

but it turns out the main entry point also requires and exports that, so it is equivalent to:

  require('readable-stream').Transform

It illustrates the basic point though, that there can be other top level js files that you can require as module/file or test as:

  node -e "require('./file')"

Tom

--
Tom Hughes (t...@compton.nu)
http://compton.nu/
_______________________________________________
nodejs mailing list
nodejs@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/nodejs@lists.fedoraproject.org

Reply via email to