This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

deep-scan-dir

1.2.0 • Public • Published

Maintainability Build Status Coverage Status

deep-scan-dir

专注于深度扫描给定文件夹,额外仅支持了忽略行为。

目录

安装

# 使用 NPM 
$ npm i deep-scan-dir
 
# 使用 Yarn 
$ yarn add deep-scan-dir

deepScanDir({from, exclude})

  • from {String} 目标文件或文件夹,默认: .
  • exclude {Object}
    • dir {String | Array} 文件夹忽略规则
    • file {String | Array} 文件忽略规则
  • 返回: {Promise} 扫描到的文件夹、文件

使用

import { realpathSync } from 'fs';
// import { deepScanDir } from 'deep-scan-dir';
import deepScanDir from 'deep-scan-dir/lib/deepScanDir';
 
(async () => {
  const {dirs, files} = await deepScanDir({
    from: realpathSync(process.cwd()),
    exclude: {
      dir: [
        'node_modules',
        '.git',
      ],
    },
  });
})();

deepScanDirSync({from, exclude})

  • from {String} 目标文件或文件夹,默认: .
  • exclude {Object}
    • dir {String | Array} 文件夹忽略规则
    • file {String | Array} 文件忽略规则
  • 返回: {Object} 扫描到的文件夹、文件
    • dirs {Array} 扫描到的文件夹
    • files {Array} 扫描到的文件

使用

import { realpathSync } from 'fs';
// import { deepScanDirSync } from 'deep-scan-dir';
import deepScanDirSync from 'deep-scan-dir/lib/deepScanDirSync';
 
const {dirs, files} = deepScanDirSync({
  from: realpathSync(process.cwd()),
  exclude: {
    dir: [
      'node_modules',
      '.git',
    ],
  },
});

贡献指南

仔细查阅 CONTRIBUTING.md 以了解详情。

证书

deep-scan-dir 获得了 MIT 许可,仔细查阅 LICENSE.md 以了解详情。

Package Sidebar

Install

npm i deep-scan-dir

Weekly Downloads

1

Version

1.2.0

License

MIT

Unpacked Size

9.84 kB

Total Files

4

Last publish

Collaborators

  • itonyyo