docs(examples): add advanced patterns example#1231
Closed
vincent067 wants to merge 1 commit intosindresorhus:mainfrom
Closed
docs(examples): add advanced patterns example#1231vincent067 wants to merge 1 commit intosindresorhus:mainfrom
vincent067 wants to merge 1 commit intosindresorhus:mainfrom
Conversation
Add a new example file demonstrating execa's advanced features: - Line-by-line processing with the 'lines' option - Command piping with .pipe() - Verbose mode for debugging - Script syntax with $ - Graceful error handling Also update examples readme to include the new example and improve documentation. This helps users discover and understand execa's more powerful features beyond basic command execution.
Owner
|
I'm going to close all of this as it's just AI-generated slop seemingly without any human review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hey there! 👋
I've been using execa for a while and really love how powerful it is. While checking out the examples directory, I noticed there wasn't a dedicated example showcasing some of the more advanced features.
This PR adds a new
advanced-patterns.jsexample that demonstrates:linesoption to get array output instead of strings.pipe()methodverboseoption$for shell-like scriptingI've tested it locally and it runs smoothly. The example is also designed to be educational with clear comments explaining each pattern.
Let me know if you'd like any adjustments! Happy to iterate on this. 😊
Changes:
examples/advanced-patterns.jswith 6 demo functionsexamples/readme.mdto include the new example