UNPKG

engine-base

Version:

Default engine for jonschlinkert/templates.

83 lines (52 loc) 3.49 kB
# engine-base [![NPM version](https://img.shields.io/npm/v/engine-base.svg?style=flat)](https://www.npmjs.com/package/engine-base) [![NPM monthly downloads](https://img.shields.io/npm/dm/engine-base.svg?style=flat)](https://npmjs.org/package/engine-base) [![NPM total downloads](https://img.shields.io/npm/dt/engine-base.svg?style=flat)](https://npmjs.org/package/engine-base) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/engine-base.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/engine-base) > Default engine for jonschlinkert/templates. Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. ## Install Install with [npm](https://www.npmjs.com/): ```sh $ npm install --save engine-base ``` ## Usage ```js const engine = require('engine-base')(require('engine')); const Templates = require('templates'); const app = new Templates(); // register with file extension(s) to associate with the engine app.engine('.md', engine); app.engine(['.md', '.html'], engine); app.engine('*', engine); ``` ## About <details> <summary><strong>Contributing</strong></summary> Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). </details> <details> <summary><strong>Running Tests</strong></summary> Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command: ```sh $ npm install && npm test ``` </details> <details> <summary><strong>Building docs</strong></summary> _(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_ To generate the readme, run the following command: ```sh $ npm install -g verbose/verb#dev verb-generate-readme && verb ``` </details> ### Related projects You might also be interested in these projects: * [engine](https://www.npmjs.com/package/engine): Template engine based on Lo-Dash template, but adds features like the ability to register helpers… [more](https://github.com/jonschlinkert/engine) | [homepage](https://github.com/jonschlinkert/engine "Template engine based on Lo-Dash template, but adds features like the ability to register helpers and more easily set data to be used as context in templates.") * [templates](https://www.npmjs.com/package/templates): System for creating and managing template collections, and rendering templates with any node.js template engine… [more](https://github.com/jonschlinkert/templates) | [homepage](https://github.com/jonschlinkert/templates "System for creating and managing template collections, and rendering templates with any node.js template engine. Can be used as the basis for creating a static site generator or blog framework.") ### Author **Jon Schlinkert** * [GitHub Profile](https://github.com/jonschlinkert) * [Twitter Profile](https://twitter.com/jonschlinkert) * [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) ### License Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert). Released under the [MIT License](LICENSE). *** _This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 11, 2018._