Aurélien Georget bd91a2ef93 Add 'packages/strapi-plugin-settings-manager/' from commit 'cd241c14c6a6239bca279e7accd709ba58e87cc8'
git-subtree-dir: packages/strapi-plugin-settings-manager
git-subtree-mainline: 80aa83d8460c95366547e143c74bf79ea6ae69f8
git-subtree-split: cd241c14c6a6239bca279e7accd709ba58e87cc8
2017-01-15 20:14:40 +01:00

24 lines
822 B
JavaScript

#!/usr/bin/env node
var shelljs = require('shelljs');
var animateProgress = require('./helpers/progress');
var chalk = require('chalk');
var addCheckMark = require('./helpers/checkmark');
var progress = animateProgress('Generating stats');
// Generate stats.json file with webpack
shelljs.exec(
'webpack --config internals/webpack/webpack.prod.babel.js --profile --json > stats.json',
addCheckMark.bind(null, callback) // Output a checkmark on completion
);
// Called after webpack has finished generating the stats.json file
function callback() {
clearInterval(progress);
process.stdout.write(
'\n\nOpen ' + chalk.magenta('http://webpack.github.io/analyse/') + ' in your browser and upload the stats.json file!' +
chalk.blue('\n(Tip: ' + chalk.italic('CMD + double-click') + ' the link!)\n\n')
);
}