-
Notifications
You must be signed in to change notification settings - Fork 17
Add outputFile option
#32
base: master
Are you sure you want to change the base?
Conversation
Allow to save a copy of stdout to a file
|
Why? What's the use-case? |
|
In my gulp file I have got: The new option |
|
It seems like this would be better as an option for AVA itself, not just this Gulp plugin. Can you open an issue on https://github.com/avajs/ava ? |
|
I just created a ticket in |
|
After the answer of @novemberborn in the AVA ticket it is a |
|
And alternative approach would be to add an option When streaming the output to the console one should activate the option Both the original approach using I personally like the new idea better even though it is a bit harder to understand, because it allows more flexibility. What do you think, @sindresorhus? |
|
FWIW I have no interest in maintaining |
index.js
Outdated
| subprocess.stderr.pipe(process.stderr); | ||
| } | ||
|
|
||
| if (options.outputfile) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (options.outputfile) { | |
| if (options.outputFile) { |
And the option needs to be documented in the readme.
index.js
Outdated
| } | ||
|
|
||
| if (options.outputfile) { | ||
| let filestream = fs.createWriteStream(options.outputfile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| let filestream = fs.createWriteStream(options.outputfile); | |
| const fileStream = fs.createWriteStream(options.outputfile); |
|
Alright. Let's add it here then. |
Allow to save a copy of stdout to a file