dirs-list [](https://travis-ci.org/chinanf-boy/dirs-list) [](https://codecov.io/gh/chinanf-boy/dirs-list?branch=master)
June 4, 2018 · View on GitHub
get dir path list
Install
npm install dirs-list
yarn add dirs-list
Usage
const dirsList = require('dirs-list');
let res = await dirsList(__dirname, {match:["*node_modules"],ignore:["*.git"]})
//=> __dirname all node_modules, ignore *.git
API
dirsList(dir, options)
dir
| name: | dir |
|---|---|
| Type: | string |
| Desc: | dir path |
options
match
| name: | match |
|---|---|
| Type: | string|Array |
| Desc: | match every, add the path |
ignore
| name: | ignore |
|---|---|
| Type: | string|Array |
| Desc: | ignore some, pass the path |
use by
- node-modules-size get all node_modules size
License
MIT © chinanf-boy