# require-list

> require tree list

Latest version **0.1.8** (published 2016-03-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install require-list
pnpm add require-list
yarn add require-list
bun add require-list
```

Provides the command `rlist`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2016-03-29 |
| First published | 2014-06-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Yuhei Aihara |
| Maintainers | iyu |
| Keywords | require, tree, list, rlist, require-list |

## Links

- npm: https://www.npmjs.com/package/require-list
- Repository: https://github.com/iyu/require-list
- Homepage: https://github.com/iyu/require-list#readme
- Issues: https://github.com/iyu/require-list/issues
- npm.io page: https://npm.io/package/require-list

## Dependencies (2)

- [esprima](https://npm.io/package/esprima.md) ^2.7.2
- [escodegen](https://npm.io/package/escodegen.md) ^1.6.1

## Recent versions

- 0.1.8 (latest) — 2016-03-29
- 0.1.7 — 2015-03-25
- 0.1.6 — 2015-03-11
- 0.1.5 — 2015-03-11
- 0.1.4 — 2015-03-11
- 0.1.3 — 2015-03-11
- 0.1.2 — 2015-03-11
- 0.1.1 — 2015-03-09
- 0.1.0 — 2015-03-06
- 0.0.1 — 2014-06-11

## README

Require List
==========

Required children tree.

## Installation
```
npm install -g require-list
```

## Usage
### Command
```
rlist [javascript file path in entry-point]
```
#### Example
/tmp/a.js
```javascript
var b = require('./b');
var test = require('./test');
```

/tmp/b.js
```javascript
require('./test/c');
module.exports = 'b';
```

/tmp/test/index.js
```javascript
require('./c');
```

/tmp/test/c.js
```javascript
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
```javascript
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](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
5. Create new Pull Request

---
_Source: https://npm.io/package/require-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
