Streamingly read/parse/stringify CloudFormation templates
$ npm install --save cfn-template-stream
var cfnTemplate = require('cfn-template-stream')
cfnTemplate.fromFile('./my-template.yml')
.pipe(ObjectTransform())
.pipe(cfnTemplate.Stringify('.yml'))
.pipe(fs.createWriteStream('./my-template-transformed.yml'))
Returns a transform stream that receives template strings in the specified format and emits parsed template objects.
Required
Type: string
The file extension, either .json
or .yml
.
Returns a readable stream that auto-detects the file type from the filename
and pipes the data to template.Parse
.
Required
Type: string
The path to a .json
or .yml
file.
Returns a transform stream that receives template object chunks and emits template strings.
Required
Type: string
The file extension, either .json
or .yml
.
MIT © Ben Drucker