Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wookieb/alpha-template-engine-handlebars
alpha-template-engine implementation with Handlebars
https://github.com/wookieb/alpha-template-engine-handlebars
alpha-packages alpha-template-engine handlebars nodejs template template-engine
Last synced: about 23 hours ago
JSON representation
alpha-template-engine implementation with Handlebars
- Host: GitHub
- URL: https://github.com/wookieb/alpha-template-engine-handlebars
- Owner: wookieb
- Created: 2017-03-29T18:18:03.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-29T21:31:44.000Z (over 7 years ago)
- Last Synced: 2024-10-11T15:50:15.300Z (about 1 month ago)
- Topics: alpha-packages, alpha-template-engine, handlebars, nodejs, template, template-engine
- Language: TypeScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.MD
Awesome Lists containing this project
README
# Alpha template engine - handlebars
Implementation of [alpha-template-engine](https://github.com/wookieb/alpha-template-engine) that uses Handlebars.
## Usage
```js
import {HandlebarsTemplateEngine} from 'alpha-template-engine-handlebars';const engine = new HandlebarsTemplateEngine();
// loads template.hbs and renders it
engine.renderTemplate('template', {name: 'alpha'})
.then(result => {
result; // Hello alpha!
});
```## Constructor options
| option | type | default | description |
|--------------------|--------|-----------|------------------------------------------------------------------------|
| extension | string | "hbs" | extension of template files |
| templatesDirectory | string | undefined | location of template files - by default uses current working directory |## API
[See JSDOC](./index.d.ts)