npm.io
0.5.7 • Published 7 years ago

content-genesis

Licence
MIT
Version
0.5.7
Deps
3
Size
33.2 MB
Vulns
0
Weekly
0

logo

Build Status

Install

yarn add content-genesis

Use

const { template } = require("content-genesis");
let foo = { variable1: "Foo", variable2: "Bar" };
let fooTemplate = template("/path/to/template", foo);
  • See test for more detailed code.

How it works

  1. You define a template ( like this example )
  2. Next, you define the variables which will be interpolated eg. let foo = {component: "Foo"}
  3. You call template(/template/path, variablesObject)