Skip to content

Commit 6f3c9f2

Browse files
authored
Merge pull request #408 from rznzippy/feat/add-no-progress-option
feat: Adds `--no-progress` flag that disables the progress bar
2 parents 9240760 + 776cef5 commit 6f3c9f2

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

.changeset/lemon-cooks-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"plop": patch
3+
---
4+
5+
Adds --no-progress flag that disables the progress bar

packages/plop/src/console-out.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ function displayHelpScreen() {
7878
chalk.dim(
7979
" --dest Output to this directory instead of the plopfile's parent directory",
8080
),
81+
chalk.dim(" --no-progress Disable the progress bar"),
8182
"",
8283
chalk.bold("Examples:"),
8384
" $ " + chalk.blue("plop"),

packages/plop/src/plop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const isInJest = process.env.NODE_ENV === "test";
2626
const progressSpinner = ora({
2727
// Default is stderr
2828
stream: isInJest ? process.stdout : process.stderr,
29-
isEnabled: !isInJest,
29+
isEnabled: !isInJest && argv.progress !== false,
3030
});
3131

3232
/**

packages/plop/tests/__snapshots__/input-processing.spec.js.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Options:
2121
--cwd Directory from which relative paths are calculated against while locating the plopfile
2222
--preload String or array of modules to require before running plop
2323
--dest Output to this directory instead of the plopfile's parent directory
24+
--no-progress Disable the progress bar
2425
2526
Examples:
2627
$ plop

0 commit comments

Comments
 (0)