代码拉取完成,页面将自动刷新
/**
* NPM post-install middleware.
* By default runs webpack.
*
* Set SKIP_WEBPACK=true` to skip the webpack build.
* Set `DELETE_DEPENDENCIES=true` to delete node_modules and bower_components.
* Useful when building the client for only the `public` folder.
*/
const cp = require("child_process");
const spawn = cp.spawn;
const exec = cp.exec;
const remove_dependencies = () => {
const rm = exec("rm -rf node_modules && rm -rf bower_components");
return rm;
};
if (process.env.SKIP_WEBPACK === "true") {
console.log("Skipping webpack build because SKIP_WEBPACK=true");
} else {
const command = spawn("webpack");
command.stdout.on("data", function(data) {
process.stdout.write(data);
});
command.stderr.on("data", function(data) {
process.stdout.write(data);
});
command.on("exit", () => {
// Use when we only need the public folder.
if (process.env.DELETE_DEPENDENCIES === "true") {
console.log(
"Cleaning up dependencies because `DELETE_DEPENDENCIES=true`."
);
remove_dependencies();
}
});
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。