Skip to content

Commit

Permalink
refactor: change console output format for deps installation
Browse files Browse the repository at this point in the history
  • Loading branch information
maverox committed Jun 8, 2024
1 parent a295914 commit e6add83
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/create-webpack-app/src/plopfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ export default function (plop: NodePlopAPI) {
if (answers.isPostCSS) {
dependencies.push("postcss-loader", "autoprefixer");
}
console.log(`Installing packages: ${dependencies.join(", ")}`);
console.log(`Installing packages: ${dependencies.join("\n")}`);
const returnMessage = `Project ${answers.projectName} has been successfully created at ${answers.projectPath}/${answers.projectName}`;

const packageManager = answers.packageManager;
const installCommandPrefix = packageManager === "yarn" ? "add" : "install";

Expand All @@ -37,9 +38,6 @@ export default function (plop: NodePlopAPI) {
npmInstallPackages.stderr.on("data", (data) => {
console.error(data.toString());
});
npmInstallPackages.on("error", (err) => {
console.error(err);
});
npmInstallPackages.on("close", (code) => {
if (code !== 0) {
console.error(`child process exited with code ${code}`);
Expand Down

0 comments on commit e6add83

Please sign in to comment.