# content-genesis

> generate interpolated content from template files

Latest version **0.5.7** (published 2019-06-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install content-genesis
pnpm add content-genesis
yarn add content-genesis
bun add content-genesis
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.7 |
| Published | 2019-06-12 |
| First published | 2018-01-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 33.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | alechp |

## Links

- npm: https://www.npmjs.com/package/content-genesis
- Repository: https://github.com/servexyz/content-genesis
- Homepage: https://github.com/servexyz/content-genesis#readme
- Issues: https://github.com/servexyz/content-genesis/issues
- npm.io page: https://npm.io/package/content-genesis

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^2.3.0
- [prettier](https://npm.io/package/prettier.md) ^1.10.2
- [multiline](https://npm.io/package/multiline.md) ^1.0.2

## Recent versions

- 0.5.7 (latest) — 2019-06-12
- 0.5.6 — 2018-02-08
- 0.5.5 — 2018-02-04
- 0.5.4 — 2018-01-28
- 0.5.3 — 2018-01-27
- 0.5.2 — 2018-01-27
- 0.5.1 — 2018-01-27

## README

![logo](docs/images/logo/content-genesis@2x.png)

[![Build Status](https://travis-ci.org/servexyz/content-genesis.svg?branch=master)](https://travis-ci.org/servexyz/content-genesis)

## Install

```bash
yarn add content-genesis
```

## Use

```js
const { template } = require("content-genesis");
let foo = { variable1: "Foo", variable2: "Bar" };
let fooTemplate = template("/path/to/template", foo);
```

* See [test](./tests/content.test.js) for more detailed code.

## How it works

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

## Related

* `file-genesis` [@github](https://github.com/servexyz/file-genesis) | [@npm](https://www.npmjs.com/package/file-genesis)
* `library-genesis` [@github](https://github.com/servexyz/library-genesis) | [@npm](https://www.npmjs.com/package/library-genesis)

---
_Source: https://npm.io/package/content-genesis · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
