mirror of
https://github.com/yldio/copilot.git
synced 2024-11-14 15:20:06 +02:00
26 lines
617 B
JavaScript
Executable File
26 lines
617 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const forEach = require('apr-for-each');
|
|
const execa = require('execa');
|
|
const globby = require('globby');
|
|
const main = require('apr-main');
|
|
const argv = require('yargs').argv;
|
|
const path = require('path');
|
|
|
|
const run = async (files = []) =>
|
|
forEach(files, async file =>
|
|
execa('quality-docs', [file], {
|
|
stdio: 'inherit'
|
|
})
|
|
);
|
|
|
|
const all = async () => {
|
|
const files = await globby(['packages/**/*.md', './*.md'], {
|
|
cwd: path.join(__dirname, '..')
|
|
});
|
|
|
|
return run(files.filter(pathname => !/node_modules/.test(pathname)));
|
|
};
|
|
|
|
main(argv._.length ? run(argv._) : all());
|