UNPKG

statistician

Version:

Create and compare files stats, and webpack bundle stats

31 lines (27 loc) 624 B
const program = require('.'); const getJSON = require('../../lib/getJSON'); /** * Create the markdown for the pull request * @param {String} [options.bundle] Two file routes separated by comma * @param {String} [options.files] Two file routes separated by comma * @return {String} */ module.exports = async({bundle, file, html} = {}) => program({ // before, after bundle: bundle && await Promise.all( bundle .split(',') .map( file => getJSON(file, null) ) ), // before, after file: file && await Promise.all( file .split(',') .map( file => getJSON(file, null) ) ), html, });