https://github.com/jcoreio/cfn-template-yaml-to-js
converts AWS CloudFormation templates from yaml directly to JS object literals
https://github.com/jcoreio/cfn-template-yaml-to-js
aws cloudformation converter
Last synced: 4 months ago
JSON representation
converts AWS CloudFormation templates from yaml directly to JS object literals
- Host: GitHub
- URL: https://github.com/jcoreio/cfn-template-yaml-to-js
- Owner: jcoreio
- License: mit
- Created: 2021-01-13T21:51:49.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-13T22:03:43.000Z (over 5 years ago)
- Last Synced: 2025-09-16T23:05:10.876Z (9 months ago)
- Topics: aws, cloudformation, converter
- Language: TypeScript
- Homepage: https://codemodsquad.github.io/try-it-pages/#/cfn-template-yaml-to-js
- Size: 228 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# cfn-template-yaml-to-js
[](https://circleci.com/gh/jcoreio/cfn-template-yaml-to-js)
[](https://codecov.io/gh/jcoreio/cfn-template-yaml-to-js)
[](https://github.com/semantic-release/semantic-release)
[](http://commitizen.github.io/cz-cli/)
[](https://badge.fury.io/js/cfn-template-yaml-to-js)
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
```