files-list
v1.4.1
Published
get path dir/child all file path
Downloads
11
Readme
files-list
「 get path dir/+child all file path 」
Install
npm install files-list
yarn add files-list
Usage
const filesList = require('files-list');
(async () => {
let results = await filesList('./test.js')
// ['.editorconfig',
// '.gitattributes',
// '.gitignore',
// '.npmrc',
// '.travis.yml',
// '.yo-rc.json',
// 'files-list.js',
// 'license',
// 'package.json',
// 'readme.md',
// 'test.js',
// 'yarn.lock' ]
});)
filesList.sync()
is sync
API
filesList(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 |
~~filesList.sync(path, [options])~~
split the code to files-list-sync
cancat
- dirs-list get dir path
- files-list-sync sync version
Use by
- translate-mds translate your md files
License
MIT © chinanf-boy