Skip to content

simonplend/using-execa-es-module-in-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

using-execa-es-module-in-node

Example scripts using the execa library.

Article

The code in this repository was written to accompany the article Running commands with execa in Node.js.

Requirements

Usage

npm install

Examples

Dynamically importing the execa ES module in a CommonJS module

  • Code
  • Run: node examples/commonjs-usage.cjs

Running a command with execa

  • Code
  • Run: node examples/run-1.js

Capturing stderr

  • Code
  • Run: node examples/run-2.js

Error handling

  • Code
  • Run: node examples/run-3.js

Cancelling a child process

  • Code
  • Run: node examples/run-4.js

Piping output from a child process

  • Code
  • Run: node examples/run-5.js

Redirecting output to a file

  • Code
  • Example: node examples/run-6.js

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published