Skip to content

docs: Add practical examples directory#1228

Closed
vincent067 wants to merge 0 commit intosindresorhus:mainfrom
vincent067:feature/add-examples
Closed

docs: Add practical examples directory#1228
vincent067 wants to merge 0 commit intosindresorhus:mainfrom
vincent067:feature/add-examples

Conversation

@vincent067
Copy link
Copy Markdown

Hi there! 👋

First off, thanks for building such an awesome library! execa has been a joy to use in my projects.

This PR adds a new examples/ directory with practical, real-world code samples. I noticed that while the documentation is excellent, there's a bit of a learning curve when transitioning from reading the docs to actually implementing common use cases. These examples aim to bridge that gap! 🚀

What's included

File Description
build-script.js Running build commands with error handling and logging
git-helpers.js Common Git operations using execa
parallel-tasks.js Executing multiple commands concurrently
stream-processing.js Working with stdout/stderr streams

Why this helps

  • New users can see patterns they can adapt immediately
  • Common workflows are demonstrated with best practices
  • Less friction from "how do I...?" to "I get it!"

I'm happy to adjust the examples based on your feedback—whether that's adding more comments, changing the coding style, or including additional use cases. Just let me know! 😊

Thanks for considering this contribution! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant