🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

coffeeformation

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coffeeformation

Coffeescript DSL to build AWS CloudFormation templates more easily, with a roundtrip-capable decompiler for your existing JSON templates

1.0.13
latest
Source
npm
Version published
Weekly downloads
6
Maintainers
2
Weekly downloads
 
Created
Source

Coffeeformation :coffee::factory:

A Coffeescript DSL to describe your AWS CloudFormation stacks. CloudFormation already allows you to describe your infrastructure using JSON or YAML data. Coffeeformation takes the next step by enabling code structures like file includes, comments, helper functions, and loops.

The tool

Coffeeformation is available as a lightweight command line tool published to npm. Installation is straightforward:

npm install -g coffeeformation

There are a couple subcommands:

  • coffeeform compile evaluates the specified files (*.coffee by default) in the current directory and, for those containing a valid CoffeeFormation stack, generates matching CloudFormation JSON output files. This is the default mode, so there's a shorthand: simply coffeeform.

  • coffeeform decompile is the opposite: It will take your existing CloudFormation JSON files (*.cf, *.json) in the current directory and output valid Coffeeformation files. This lets you get started with Coffeeformation easily, by immediately converting your existing JSON templates into readable coffeescript syntax.

    Once you decompile a folder of stacks, simply edit the generated files and run coffeeform compile going forward to sync the changes back to the CloudFormation JSON.

Filenames starting with an underscore are skipped when processing the current directory. For example, you can have a _vpc.coffee file with shared VPC mapping data, and use require('./_vpc') in a neighboring Coffeeform stack to include that data.

You can also provide an explicit list of files to either subcommand. This overrides the directory scan for more advanced usage.

For available options and more CLI help, run coffeeform --help.

Keywords

aws

FAQs

Package last updated on 24 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts