0.1.8 • Published 8 years ago

require-list v0.1.8

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

Require List

Required children tree.

Installation

npm install -g require-list

Usage

Command

rlist [javascript file path in entry-point]

Example

/tmp/a.js

var b = require('./b');
var test = require('./test');

/tmp/b.js

require('./test/c');
module.exports = 'b';

/tmp/test/index.js

require('./c');

/tmp/test/c.js

module.exports = function() { return 'c' };
$ rlist /tmp/a.js
/tmp/a.js
   ├── b.js
   |   └── test/c.js
   └── test/index.js
       └── test/c.js

Module API

Example

var rlist = require('require-list');

console.log('rlist(filepath)');
console.log(rlist('/tmp/a.js'));

console.log('rlist.string(filepath)');
console.log(rlist.string('/tmp/a.js'));

// --output--
// rlist(filepath)
// { '/tmp/b.js': { '/tmp/test/c.js': {} },
//  '/tmp/test/index.js': { '/tmp/test/c.js': {} } } }

// rlist.string(filepath)
// /tmp/a.js
//    ├── b.js
//    |   └── test/c.js
//    └── test/index.js
//        └── test/c.js

Contribution

  1. Fork it ( https://github.com/iyu/require-list/fork )
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Run test suite with the npm test; npm run jshint command and confirm that it passes
  6. Create new Pull Request
0.1.8

8 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.1

10 years ago