1.0.3 • Published 7 years ago

fill-in-the-blanks v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

Fill-In-The-Blanks (F.I.T.B.)

The F.I.T.B. is to take opinionated templated JSON files and JSON data and then produces output by filling in the placeholders with data.

Installation

npm install -g fill-in-the-blanks

Usage

fill-in-the-blanks <templateFile> <dataFile> <outputFile>

Example

Templated file with placeholders backup-template.json

{
    "exampleField": "{{=param.fieldA}}",
    "sevenFold": "{{=param.fieldB}}",
    "normal": "just some data"
}

Data file data.json

{
    "fieldA": "valueForFieldA",
    "fieldB": "anotherValueForFieldB"
}

Executing fill-in-the-blanks backup-template.json data.json output.json will produce:

Output file output.json

{
    "exampleField": "valueForFieldA",
    "sevenFold": "anotherValueForFieldB",
    "normal": "just some data"
}
1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago