Awesome
files-list-sync
「 get path dir/+child all file path 」
Install
npm install files-list-sync
yarn add files-list-sync
Usage
const filesListSync = require('files-list-sync');
let results = filesListSync('./test.js');
// ['.editorconfig',
// '.gitattributes',
// '.gitignore',
// '.npmrc',
// '.travis.yml',
// '.yo-rc.json',
// 'files-list-sync.js',
// 'license',
// 'package.json',
// 'readme.md',
// 'test.js',
// 'yarn.lock' ]
API
filesListSync(path, [options])
path
name: | path |
---|
Type: | string |
Desc: | path file/dir |
options
deep
name: | deep |
---|
Type: | number |string {'all'} |
Default: | 1 |
Desc: | how deep you want |
ignore
name: | ignore |
---|
Type: | Array |
Default: | ['.git', 'node_modules'] |
Desc: | ignore Dir name you want |
cancat
Use by
License
MIT © chinanf-boy