UNPKG

kibana-123

Version:

Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elastic

39 lines (32 loc) 930 B
import { fromRoot } from '../../utils'; import { chain, memoize } from 'lodash'; import { resolve } from 'path'; import { map, fromNode } from 'bluebird'; import glob from 'glob-all'; let findSourceFiles = async (patterns, cwd = fromRoot('.')) => { patterns = [].concat(patterns || []); const matches = await fromNode(cb => { glob(patterns, { cwd: cwd, ignore: [ 'node_modules/**/*', 'bower_components/**/*', '**/_*.js' ], symlinks: findSourceFiles.symlinks, statCache: findSourceFiles.statCache, realpathCache: findSourceFiles.realpathCache, cache: findSourceFiles.cache }, cb); }); return chain(matches) .flatten() .uniq() .map(match => resolve(cwd, match)) .value(); }; findSourceFiles.symlinks = {}; findSourceFiles.statCache = {}; findSourceFiles.realpathCache = {}; findSourceFiles.cache = {}; module.exports = findSourceFiles;