get dir path list
npm install dirs-list
yarn add dirs-list
const dirsList = require('dirs-list');
let res = await dirsList(__dirname, {match:["*node_modules"],ignore:["*.git"]})
//=> __dirname all node_modules, ignore *.git
name: | dir |
---|---|
Type: | string |
Desc: | dir path |
name: | match |
---|---|
Type: | string |Array |
Desc: | match every, add the path |
name: | ignore |
---|---|
Type: | string |Array |
Desc: | ignore some, pass the path |
- node-modules-size get all node_modules size
MIT © chinanf-boy