2019-04-28 21:33:41 +00:00
|
|
|
const fs = require('fs-extra');
|
|
|
|
const {execSync} = require('child_process');
|
|
|
|
const path = require('path');
|
|
|
|
const rimraf = require('util').promisify(require('rimraf'));
|
|
|
|
|
|
|
|
const collector = path.join(__dirname, './coverage-collector.js');
|
|
|
|
const destination = path.join(__dirname, '../.nyc_output');
|
2019-04-30 21:45:29 +00:00
|
|
|
const cmd = `npx lerna exec --parallel node "${collector}" "${destination}"`;
|
2019-04-28 21:33:41 +00:00
|
|
|
|
|
|
|
(async () => {
|
|
|
|
await fs.mkdirp(destination);
|
|
|
|
await rimraf(path.join(destination, '*'));
|
|
|
|
execSync(cmd, {stdio: 'inherit'});
|
|
|
|
})();
|