https://github.com/chinanf-boy/dirs-list
code: <dirs-list> most get all node_modules path 获得 所有 ** 的 目录路径 ✅
https://github.com/chinanf-boy/dirs-list
dir path
Last synced: about 1 year ago
JSON representation
code: <dirs-list> most get all node_modules path 获得 所有 ** 的 目录路径 ✅
- Host: GitHub
- URL: https://github.com/chinanf-boy/dirs-list
- Owner: chinanf-boy
- License: mit
- Created: 2018-05-30T08:32:50.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-04T03:13:47.000Z (about 8 years ago)
- Last Synced: 2024-12-08T09:15:46.423Z (over 1 year ago)
- Topics: dir, path
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# dirs-list [](https://travis-ci.org/chinanf-boy/dirs-list) [](https://codecov.io/gh/chinanf-boy/dirs-list?branch=master)
> get dir path list
[中文](./readme.md) | ~~[english](./readme.en.md)~~
## Install
```
npm install dirs-list
```
```
yarn add dirs-list
```
## Usage
```js
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
- [use matcher](https://github.com/sindresorhus/matcher)
##### ignore
name: | ignore
---------|----------
Type: | `string`\|`Array`
Desc: | ignore some, pass the path
- [use matcher](https://github.com/sindresorhus/matcher)
## use by
- [node-modules-size](https://github.com/chinanf-boy/node-modules-size) get all node_modules size
## License
MIT © [chinanf-boy](http://llever.com)