interpolate-shell
Takes a string that has placeholders containing shell commands, replaces the placeholders with the stdout value of their shell commands, and calls a callback with the result.
install
npm install interpolate-shell
example
const interpolateShell =
API
interpolateShell(template, [options], cb)
template: string
options: object
left: string, {{
left delimiterright: string, }}
right delimiterignoreErrors: boolean, false
process template even if a command fails. By default, running commands will be killed and there will be no result when a command fails.
cb: function (errors, result)