<commit_before># cloudformation-extensions

[![Build Status](https://travis-ci.com/joshbalfour/cloudformation-extensions.svg?token=MNpwzj1DWBzELMwhWybL&branch=master)](https://travis-ci.com/joshbalfour/cloudformation-extensions)

Extensions to Amazon's CloudFormation Template JSON format.


## Installation

### Use the Docker Container (recommended)

`docker run -v .:/cfnex joshbalfour/cfnex -i /cfnex/{inFile} -o /cfnex/{outFile}`

(mapping the current directory to /cfnex in the container)

### or grab from NPM
`npm install -g cloudformation-extensions`

`cfnex -i {inFile} -o {outFile}`

## Description
This is designed to make using Amazon's CloudFormation template format easier, more understandable, and more maintainable.
CloudFormation templates are incredibly powerful, but quickly become complicated, and you end up with multiple thousands of lines of JSON which isn't very practical.
Writing CloudFormation templates using cfnex retains the power of vanilla CloudFormation templates whilst increasing readability and maintainability.

Writing a cfnex extension is as easy as creating a function which takes an object and returns a promise. You can find examples of this in [the extensions folder](extensions) and a tutorial [below](#writing-your-own-extensions).
<commit_msg>badges<commit_after># cloudformation-extensions

[![Build Status](https://travis-ci.com/joshbalfour/cloudformation-extensions.svg?token=MNpwzj1DWBzELMwhWybL&branch=master)](https://travis-ci.com/joshbalfour/cloudformation-extensions)
[![Docker Automated build](https://img.shields.io/docker/automated/joshbalfour/cfnex.svg?maxAge=2592000)]()
[![npm](https://img.shields.io/npm/dm/cloudformation-extensions.svg?maxAge=2592000)]()

Extensions to Amazon's CloudFormation Template JSON format.


## Installation

### Use the Docker Container (recommended)

`docker run -v .:/cfnex joshbalfour/cfnex -i /cfnex/{inFile} -o /cfnex/{outFile}`

(mapping the current directory to /cfnex in the container)

### or grab from NPM
`npm install -g cloudformation-extensions`

`cfnex -i {inFile} -o {outFile}`

## Description
This is designed to make using Amazon's CloudFormation template format easier, more understandable, and more maintainable.
CloudFormation templates are incredibly powerful, but quickly become complicated, and you end up with multiple thousands of lines of JSON which isn't very practical.
Writing CloudFormation templates using cfnex retains the power of vanilla CloudFormation templates whilst increasing readability and maintainability.

Writing a cfnex extension is as easy as creating a function which takes an object and returns a promise. You can find examples of this in [the extensions folder](extensions) and a tutorial [below](#writing-your-own-extensions).

{'fraction_non_alphanumeric': 0.09031791907514451, 'fraction_numerical': 0.005780346820809248, 'mean_word_length': 5.737226277372263, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '583046', 'n_tokens_mistral': 806, 'n_tokens_neox': 760, 'n_words': 282}