Skip to content

jcoreio/cfn-template-yaml-to-js

Repository files navigation

cfn-template-yaml-to-js

CircleCI Coverage Status semantic-release Commitizen friendly npm version

Converts AWS CloudFormation templates written in yaml directly to JS object expressions.

Note: block literals will be converted to dedent`...` tagged template literals; you will need to import dedent or dedent-js into the file using them.

Disclaimer

I wrote this package hastily, so it's possible it won't work on some templates. Feel free to open an issue if you run into any problems.

Usage

CLI

# read from file, print to stdout

npx cfn-template-yaml-to-js template.yaml

# read from file, output to file

npx cfn-template-yaml-to-js template.yaml > file.js

# read from stdin, print to stdout

cat template.yaml | npx cfn-template-yaml-to-js

About

converts AWS CloudFormation templates from yaml directly to JS object literals

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published