Skip to content

Commit

Permalink
Merge pull request #408 from rznzippy/feat/add-no-progress-option
Browse files Browse the repository at this point in the history
feat: Adds `--no-progress` flag that disables the progress bar
  • Loading branch information
crutchcorn committed Dec 22, 2023
2 parents 9240760 + 776cef5 commit 6f3c9f2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lemon-cooks-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"plop": patch
---

Adds --no-progress flag that disables the progress bar
1 change: 1 addition & 0 deletions packages/plop/src/console-out.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function displayHelpScreen() {
chalk.dim(
" --dest Output to this directory instead of the plopfile's parent directory",
),
chalk.dim(" --no-progress Disable the progress bar"),
"",
chalk.bold("Examples:"),
" $ " + chalk.blue("plop"),
Expand Down
2 changes: 1 addition & 1 deletion packages/plop/src/plop.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const isInJest = process.env.NODE_ENV === "test";
const progressSpinner = ora({
// Default is stderr
stream: isInJest ? process.stdout : process.stderr,
isEnabled: !isInJest,
isEnabled: !isInJest && argv.progress !== false,
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Options:
--cwd Directory from which relative paths are calculated against while locating the plopfile
--preload String or array of modules to require before running plop
--dest Output to this directory instead of the plopfile's parent directory
--no-progress Disable the progress bar
Examples:
$ plop
Expand Down

0 comments on commit 6f3c9f2

Please sign in to comment.