Skip to content

Commit

Permalink
misc(utils): refactors scaffold
Browse files Browse the repository at this point in the history
refactors the conditional statements in scaffold.ts
  • Loading branch information
pranshuchittora committed Apr 6, 2019
1 parent b96857f commit 0b28fb3
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions packages/utils/scaffold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,16 @@ export default function runTransform(transformConfig: ITransformConfig, action:
console.error(err.message ? err.message : err);
});
});

let successMessage : string = `Congratulations! Your new webpack configuration file has been created!\n`
if (initActionNotDefined && transformConfig.config.item) {
process.stdout.write(
"\n" +
chalk.green(
`Congratulations! ${
transformConfig.config.item
} has been ${action}ed!\n`,
),
);
} else {
process.stdout.write(
"\n" +
chalk.green(
"Congratulations! Your new webpack configuration file has been created!\n",
),
);
successMessage = `Congratulations! ${
transformConfig.config.item
} has been ${action}ed!\n`
}
process.stdout.write(
"\n" +
chalk.green(
successMessage
)
);
}

0 comments on commit 0b28fb3

Please sign in to comment.