# counsel-template

> runs a template engine against a template file!

Latest version **0.4.1** (published 2017-08-14) · ISC license · 0 weekly downloads

## Install

```sh
npm install counsel-template
pnpm add counsel-template
yarn add counsel-template
bun add counsel-template
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.1 |
| Published | 2017-08-14 |
| First published | 2016-10-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | cdaringe |
| Maintainers | cdaringe |

## Links

- npm: https://www.npmjs.com/package/counsel-template
- Repository: https://github.com/cdaringe/counsel
- Homepage: https://cdaringe.github.io/counsel/
- Issues: https://github.com/cdaringe/counsel/issues
- npm.io page: https://npm.io/package/counsel-template

## Dependencies (3)

- [fs-extra](https://npm.io/package/fs-extra.md) ^4.0.1
- [counsel-rule](https://npm.io/package/counsel-rule.md) ^0.4.1
- [swig-templates](https://npm.io/package/swig-templates.md) ^2.0.1

## Recent versions

- 0.4.1 (latest) — 2017-08-14
- 0.4.0 — 2017-08-14
- 0.3.1-0 — 2017-08-14
- 0.3.0 — 2017-08-08
- 0.2.0 — 2017-08-07
- 0.1.4 — 2017-03-27
- 0.1.1 — 2017-03-23
- 0.0.29 — 2017-01-17
- 0.0.28 — 2017-01-12
- 0.0.26 — 2017-01-09
- 0.0.23 — 2016-12-01
- 0.0.22 — 2016-12-01
- 0.0.21 — 2016-11-17
- 0.0.20 — 2016-11-17
- 0.0.19 — 2016-11-15
- … 13 more at https://npm.io/package/counsel-template/versions

## README

# counsel-template

runs a template engine against a template file!

your template is passed all of `counsel`, and the the target project's package.json.  the current template engine employed is [swig-templates](http://node-swig.github.io/swig-templates/).

## example

- prep a teamplate file, such as `README.swig`

```jinja
// README.swig
# {{ package.name }}

{{ package.description }}
```

- create your rule

```js
// my-readme-template-rule.js
'use strict'

const TemplateRule = require('counsel-template')

module.exports = new TemplateRule({
  templateSource: './README.swig', // relative to your counsel project's root (package.json folder)
  templateTarget: './README.md' // relative to the target package's root
})
```

- apply it (per `counsel` docs)
- enjoy the output!

```md
// README.md
# my-project

my project description!
```

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