UNPKG

@tenlastic/mochawesome-merge-json

Version:
19 lines 671 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const fs = require("fs"); const mkdirp = require("mkdirp"); const path = require("path"); const yargs_1 = require("yargs"); const merge_1 = require("./merge"); const output = yargs_1.argv.output || 'mochawesome.json'; const pattern = yargs_1.argv.pattern; // Merge all mochawesome JSON files. const result = merge_1.merge(pattern); if (result) { // Create the directory if it does not exist. const dirname = path.dirname(output); mkdirp.sync(dirname); // Write the results to a JSON file. fs.writeFileSync(output, JSON.stringify(result)); } //# sourceMappingURL=index.js.map