Bingo input that runs a script.
npm install input-from-scriptBingo input that runs a script.
``shell`
npm i input-from-script
`ts
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 from execa, including the stdout` property
See create.bingo > Templates > Concepts > Inputs for more documentation on Inputs.