Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/calvinlfer/fill-in-the-blanks
A very simple command line tool that takes opinionated template files and data and generates an output file
https://github.com/calvinlfer/fill-in-the-blanks
Last synced: 4 days ago
JSON representation
A very simple command line tool that takes opinionated template files and data and generates an output file
- Host: GitHub
- URL: https://github.com/calvinlfer/fill-in-the-blanks
- Owner: calvinlfer
- Created: 2017-06-28T19:51:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-06-28T20:14:28.000Z (over 7 years ago)
- Last Synced: 2024-11-07T08:51:45.466Z (7 days ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 `## Example
Templated file with placeholders
backup-template.json
```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"
}
```