entry-points

Find a node module's possible entry points

entry-points

Find a node module's possible entry points, like it's main script and bin scripts.

var find = require('entry-points');
 
find(__dirname, function(errentries){
  console.log(entries);
  // ['index.js', 'bin/foo'] 
});

There's also a cli for quick inspection:

$ npm install -g entry-points
$ entry-points
index.js
bin/foo
$ npm install entry-points

MIT