read-dir-recur
Recursively read directories
Last updated 2 years ago by tiaanduplessis .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install read-dir-recur 
SYNC missed versions from official npm registry.

read-dir-recur

package version package downloads standard-readme compliant package license make a pull request

Recursively read directories

Table of Contents

Install

This project uses node and npm.

$ npm install read-dir-recur
$ # OR
$ yarn add read-dir-recur

Usage

When reading dir with this structure:

bar/
├── baaa
├── baz.js
├── ping.js
└── pong.md
const readDirRecur = require('read-dir-recur')

console.log(readDirRecur({ readFile: false, pattern: '*.js', ignore: ['baaa'], base: ROOT_DIR }))
//  { bar:
//        [ { base: 'bar', name: 'baz.js', ext: '.js', size: 0 },
//          { base: 'bar', name: 'ping.js', ext: '.js', size: 0 } ] }

Uses micromatch for pattern and ignore of files.

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am "Add some feature"
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT

Current Tags

  • 2.0.0                                ...           latest (2 years ago)

2 Versions

  • 2.0.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (1)
Dev Dependencies (4)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |