better examples generation, so that example can acctually run

This commit is contained in:
Tobias Koppers 2013-12-19 23:23:12 +01:00
parent b9ce650150
commit f2a88fca2e
2 changed files with 9 additions and 23 deletions

View File

@ -12,13 +12,13 @@ var path = require("path");
var extraArgs = "";
var targetArgs = global.NO_TARGET_ARGS?"":" ./example.js js/output.js"
cp.exec("node ../../bin/webpack.js --display-reasons --display-chunks -p "+extraArgs+targetArgs, function (error, stdout, stderr) {
cp.exec("node ../../bin/webpack.js --display-reasons --display-chunks --output-public-path \"js/\" -p "+extraArgs+targetArgs, function (error, stdout, stderr) {
if(stderr)
console.log(stderr);
if (error !== null)
console.log(error);
var readme = tc(fs.readFileSync(require("path").join(process.cwd(), "template.md"), "utf-8"), process.cwd(), stdout.replace(/[\r\n]*$/, ""), "min");
cp.exec("node ../../bin/webpack.js --display-reasons --display-chunks --optimize-occurence-order --output-pathinfo "+extraArgs+targetArgs, function (error, stdout, stderr) {
cp.exec("node ../../bin/webpack.js --display-reasons --display-chunks --output-public-path \"js/\" --optimize-occurence-order --output-pathinfo "+extraArgs+targetArgs, function (error, stdout, stderr) {
console.log(stdout);
if(stderr)
console.log(stderr);

View File

@ -1,26 +1,12 @@
var cp = require('child_process');
var path = require("path");
var fs = require("fs");
var cmds = [
"cd code-splitted-require.context && node build.js",
"cd code-splitted-require.context-amd && node build.js",
"cd code-splitting && node build.js",
"cd coffee-script && node build.js",
"cd loader && node build.js",
"cd require.context && node build.js",
"cd code-splitting-bundle-loader && node build.js",
"cd commonjs && node build.js",
"cd named-chucks && node build.js",
"cd require.resolve && node build.js",
"cd mixed && node build.js",
"cd web-worker && node build.js",
"cd i18n && node build.js",
"cd labeled-modules && node build.js",
"cd component && node build.js",
"cd dedupe && node build.js",
"cd code-splitted-dedupe && node build.js",
"cd multiple-entry-points && node build.js",
"cd multiple-commons-chunks && node build.js",
];
var cmds = fs.readdirSync(__dirname).filter(function(dirname) {
return fs.statSync(path.join(__dirname, dirname)).isDirectory();
}).sort().map(function(dirname) {
return "cd " + dirname + " && node build.js";
});
var stack = function() {
console.log("done");