全局-gitignore
 扩展 ,支持根据 gitignore 规则过滤文件,并基于公开可选的 Promise API。
 此模块旨在解决性能问题,请参阅 。
安装
$ npm i glob-gitignore --save
用法
 import {
  glob ,
  sync ,
  hasMagic
} from 'glob-gitignore'
// The usage of glob-gitignore is much the same as `node-glob`,
// and it supports an array of patterns to be matched
glob ( [ '**' ] , {
  cwd : '/path/to' ,
  // Except that options.ignore accepts an array of gitignore
                                    
                                    
                                        
                                            1