# curli-templates-module

> Templates for Curli Framework

Latest version **0.0.1-beta.0** (published 2020-05-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install curli-templates-module
pnpm add curli-templates-module
yarn add curli-templates-module
bun add curli-templates-module
```

## 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.0.1-beta.0 |
| Published | 2020-05-01 |
| First published | 2020-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 10.0.0 |
| Dependencies | 3 |
| Unpacked size | 12.9 KB |
| Known vulnerabilities | 0 (+13 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Carlos Juan Craviotto |
| Maintainers | curlirojo |
| Keywords | templates, template, files templates, handlebars, html, compilers, curli, curli framework, typescript, javascript |

## Links

- npm: https://www.npmjs.com/package/curli-templates-module
- Repository: https://github.com/CarlosCraviotto/curli-templates-module
- Homepage: https://github.com/CarlosCraviotto/curli-templates-module#readme
- Issues: https://github.com/CarlosCraviotto/curli-templates-module/issues
- npm.io page: https://npm.io/package/curli-templates-module

## Dependencies (3)

- [handlebars](https://npm.io/package/handlebars.md) 4.7.6
- [curli-types](https://npm.io/package/curli-types.md) 0.0.1-beta.11
- [file-list-loader](https://npm.io/package/file-list-loader.md) 0.0.1-beta.1

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.1-beta.0 (latest) — 2020-05-01
- 0.0.2-beta.0 (beta) — 2020-05-03

## README

# curli-templates-module
Templates  for  the [Curli framework](https://github.com/CarlosCraviotto/curli-core/).

[![Build Status](https://travis-ci.org/CarlosCraviotto/curli-templates-module.svg?branch=master)](https://travis-ci.com/github/CarlosCraviotto/curli-templates-module)



### Installation

Install by `npm`

```sh
npm install --save curli-templates-module
```


#### Basic Usage

**1 - In the configurations file, declare  de followings properties:**

**@TEMPLATE_EXTENSIONS**: (Array<string>) A list of extension, should be ['hbs', 'handlebars'].
**@TEMPLATE_USE_FILE_PATH_IN_ID** (boolean) If we want add the path to the file into the id.

**2 - Add the module definer:**

```typescript
import {TemplatesModuleDefiner} from "curli-templates-module";

app.addModulesDefiner(new TemplatesModuleDefiner(app));
```

**3 - Attach templates paths to the service**

```typescript
public registerTemplates(templatesService: TemplatesService): void {
    dataMappers.registerPath({path: 'templates/'});
}
```

**4 - Compile the template**

```typescript
await this.container.get('templates').compile('user', {"name": "John"})
```



### Commands

 - `npm run build`: Build the project (Curli templating).
 - `npm run build:clean`: Delete first the dist folder and build it.
 - `npm run clean`: Delete the dist folder.
 - `npm run test`: Execute the tests.
 - `npm run test:coverage`:  Execute the tests and calculate the coverage.
 - `npm run lint`: Check the code using the rules in .eslintre.js
 - `npm run lint:fix`: Check the code and try to fix it.



### License

MIT

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