broccoli-jet

0.0.6 • Public • Published

broccoli-jet

JET (JSON elementary templating)

This plugin ads basic templating support to a json structure.

templates support basic block and inline content replacement

usage

Block statement

Following json file

  {
    "0001": "{#Key#}hello{#Key#}"
  }

with the following context

  Key: "<span>{%outlet%}</span>"

will result in

  {
    "0001": "<span>hello</span>"
  }

Inline statement

Following json file

  {
    "0001": "Hello {%Key%}"
  }

with the following context

  Key: "Tom"

will result in

  {
    "0001": "Hello Tom"
  }

Readme

Keywords

Package Sidebar

Install

npm i broccoli-jet

Weekly Downloads

4

Version

0.0.6

License

MIT

Last publish

Collaborators

  • tdesmet