files-list-sync
v1.0.2
Published
get list of file sync
Downloads
4
Readme
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
- dirs-list get dir path
- files-list async/await list of file
Use by
- translate-mds translate your md files
License
MIT © chinanf-boy