mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[glob] switch out glob for glob-all
This commit is contained in:
parent
2722f42d30
commit
4561c829ea
4 changed files with 18 additions and 20 deletions
|
@ -100,6 +100,7 @@
|
|||
"extract-text-webpack-plugin": "0.8.2",
|
||||
"file-loader": "0.8.4",
|
||||
"font-awesome": "4.4.0",
|
||||
"glob-all": "3.0.1",
|
||||
"good": "6.3.0",
|
||||
"good-squeeze": "2.1.0",
|
||||
"gridster": "0.5.6",
|
||||
|
@ -149,7 +150,6 @@
|
|||
"eslint-plugin-mocha": "1.1.0",
|
||||
"expect.js": "0.3.1",
|
||||
"faker": "1.1.0",
|
||||
"glob": "4.5.3",
|
||||
"grunt": "0.4.5",
|
||||
"grunt-babel": "5.0.1",
|
||||
"grunt-cli": "0.1.13",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import expect from 'expect.js';
|
||||
import sinon from 'sinon';
|
||||
import nock from 'nock';
|
||||
import glob from 'glob';
|
||||
import glob from 'glob-all';
|
||||
import rimraf from 'rimraf';
|
||||
import mkdirp from 'mkdirp';
|
||||
import pluginLogger from '../plugin_logger';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import expect from 'expect.js';
|
||||
import sinon from 'sinon';
|
||||
import glob from 'glob';
|
||||
import glob from 'glob-all';
|
||||
import rimraf from 'rimraf';
|
||||
import mkdirp from 'mkdirp';
|
||||
|
||||
|
|
|
@ -3,29 +3,27 @@ import fromRoot from '../../utils/fromRoot';
|
|||
import { chain, memoize } from 'lodash';
|
||||
import { resolve } from 'path';
|
||||
import { map, fromNode } from 'bluebird';
|
||||
import { Glob } from 'glob';
|
||||
import glob from 'glob-all';
|
||||
|
||||
let findSourceFiles = async (patterns, cwd = fromRoot('.')) => {
|
||||
patterns = [].concat(patterns || []);
|
||||
|
||||
let matcheses = await map(patterns, async pattern => {
|
||||
return await fromNode(cb => {
|
||||
let g = new Glob(pattern, {
|
||||
cwd: cwd,
|
||||
ignore: [
|
||||
'node_modules/**/*',
|
||||
'bower_components/**/*',
|
||||
'**/_*.js'
|
||||
],
|
||||
symlinks: findSourceFiles.symlinks,
|
||||
statCache: findSourceFiles.statCache,
|
||||
realpathCache: findSourceFiles.realpathCache,
|
||||
cache: findSourceFiles.cache
|
||||
}, cb);
|
||||
});
|
||||
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(matcheses)
|
||||
return chain(matches)
|
||||
.flatten()
|
||||
.uniq()
|
||||
.map(match => resolve(cwd, match))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue