mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 06:00:06 +02:00
chore: use stdio
option on execa
This commit is contained in:
parent
0dbd8a6b84
commit
efd87268da
@ -11,7 +11,6 @@ const globby = require('globby');
|
||||
const main = require('apr-main');
|
||||
const argv = require('yargs').argv;
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
const getStaged = awaitify(sgf);
|
||||
|
||||
@ -37,15 +36,13 @@ const run = async (files = []) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const cp = execa(
|
||||
return execa(
|
||||
'prettier',
|
||||
['--write', '--single-quote'].concat(filter(files))
|
||||
['--write', '--single-quote'].concat(filteredFiles),
|
||||
{
|
||||
stdio: 'inherit'
|
||||
}
|
||||
);
|
||||
|
||||
cp.stdout.pipe(process.stdout);
|
||||
cp.stderr.pipe(process.stderr);
|
||||
|
||||
return cp;
|
||||
};
|
||||
|
||||
const all = async () => {
|
||||
|
@ -12,16 +12,12 @@ const CWD = path.join(__dirname, '..');
|
||||
const BIN = path.join(CWD, 'node_modules/.bin/license-to-fail');
|
||||
|
||||
const run = async (dirs = []) =>
|
||||
forEach(dirs, async dir => {
|
||||
const cp = execa(BIN, [config], {
|
||||
cwd: dir
|
||||
});
|
||||
|
||||
cp.stdout.pipe(process.stdout);
|
||||
cp.stderr.pipe(process.stderr);
|
||||
|
||||
return cp;
|
||||
});
|
||||
forEach(dirs, async dir =>
|
||||
execa(BIN, [config], {
|
||||
cwd: dir,
|
||||
stdio: 'inherit'
|
||||
})
|
||||
);
|
||||
|
||||
const all = async () => {
|
||||
const files = await globby(['packages/*/', '.'], {
|
||||
|
@ -8,14 +8,11 @@ const argv = require('yargs').argv;
|
||||
const path = require('path');
|
||||
|
||||
const run = async (files = []) =>
|
||||
forEach(files, async file => {
|
||||
const cp = execa('quality-docs', [file]);
|
||||
|
||||
cp.stdout.pipe(process.stdout);
|
||||
cp.stderr.pipe(process.stderr);
|
||||
|
||||
return cp;
|
||||
});
|
||||
forEach(files, async file =>
|
||||
execa('quality-docs', [file], {
|
||||
stdio: 'inherit'
|
||||
})
|
||||
);
|
||||
|
||||
const all = async () => {
|
||||
const files = await globby(['packages/**/*.md', './*.md'], {
|
||||
|
@ -24,14 +24,10 @@ const statuses = [
|
||||
'Unmerged'
|
||||
];
|
||||
|
||||
const exec = (args = []) => {
|
||||
const cp = execa('lerna', args);
|
||||
|
||||
cp.stdout.pipe(process.stdout);
|
||||
cp.stderr.pipe(process.stderr);
|
||||
|
||||
return cp;
|
||||
};
|
||||
const exec = (args = []) =>
|
||||
execa('lerna', args, {
|
||||
stdio: 'inherit'
|
||||
});
|
||||
|
||||
const lint = scope => exec(['run', 'lint', '--scope', scope]);
|
||||
const test = scope => exec(['run', 'test', '--scope', scope]);
|
||||
@ -65,7 +61,7 @@ const gather = async () => {
|
||||
JSON.parse(await readFile(path.join(folder, 'package.json'), 'utf-8'))
|
||||
);
|
||||
|
||||
return await map(pkgs.map(({ name }) => name), run);
|
||||
return map(pkgs.map(({ name }) => name), run);
|
||||
};
|
||||
|
||||
main(gather());
|
||||
|
Loading…
Reference in New Issue
Block a user