fix: flatten directories array passed to globby

fixes run-staged-pkg globby call
This commit is contained in:
Sérgio Ramos 2017-11-02 13:11:04 +00:00
parent 5d4b22070f
commit 8bb9c18b9c
2 changed files with 333 additions and 263 deletions

View File

@ -113,13 +113,13 @@ const runLintAndGitAdd = async (staged, pkgs) => {
const gather = async () => { const gather = async () => {
const isDirectory = source => lstatSync(source).isDirectory(); const isDirectory = source => lstatSync(source).isDirectory();
const getDirectories = source => const getDirectories = source =>
readdirSync(source).map(name => join(source, name)).filter(isDirectory); readdirSync(source)
.map(name => join(source, name))
.filter(isDirectory);
const locations = await globby( const locations = await globby(
[getDirectories('./packages'), getDirectories('./prototypes')], getDirectories('./packages').concat(getDirectories('./prototypes')),
{ { cwd: ROOT }
cwd: ROOT
}
); );
const staged = (await getStaged()) const staged = (await getStaged())

586
yarn.lock

File diff suppressed because it is too large Load Diff