Write command output to stdout
- Typos/grammar mistakes - JSDoc comments improvements
#114
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #113.
The first 4 commits are minor (typos, grammar mistakes, and JSDoc comments). The actual change (related to #113) is in 96ef4ff and affects the following files:
lib/cli/index.js
lib/cli/commands/wp.js
lib/cypress-support/commands.js
lib/modules/run.js
It basically introduces the
-w
(or--write-to-stdout
) flag for thewp
command:and adds an additional (
boolean
) parameter for that flag to:wp()
(inlib/cli/commands/wp.js
), which simply passes the value torun()
run()
(in/lib/modules/run.js
), which uses that value to determine whether we should write tostdout
or not (that way, we prevent CLI users from getting duplicate output)The new
writeToStdout
parameter is going to befalse
, by default. We're only setting the flag for the WP Cypress commands inlib/cli/cypress-support/commands.js
.So, we're essentially changing this:
to that:
I've tested the changes described in this PR on a couple of projects (and with my own Cypress commands) and AFAICT everything is working as expected.
Let me know if you need any more information! 🙂
Change Log
stdout
while keepingstderr
as it is, to prevent any breaking changes (as described in Feature request - Write command output tostdout
#113). It introduces an internally used-w, --write-to-stdout
flag for thewp
command, to prevent CLI users from getting a duplicate output.stdout
change, this PR fixes a few minor typos and grammar mistakes@return
tags)Screenshots/Videos
N/A
Types of changes (if applicable):
Checklist (if applicable):