Bingo input that runs a script.
npm i input-from-script
import { inputFromFetch } from "input-from-script";
await take(inputFromFetch, { resource: "npm whoami" });
inputFromScript
takes a single argument, command
, of type string
.
It runs the command
with execa
and returns either:
-
Error
: If an error was caught running the script -
Result
: The type fromexeca
, including thestdout
property
See create.bingo > Templates > Concepts > Inputs for more documentation on Inputs.