Package Exports
- base-engines
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (base-engines) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
base-engines

Adds support for managing template engines to your base application.
Install
Install with npm:
$ npm install --save base-enginesUsage
Register the plugin with your base application:
var Base = require('base');
var engines = require('base-engines');
base.use(engines());API
.engine
Register a view engine callback fn as ext. Calls .setEngine and .getEngine internally.
Params
exts{String|Array}: String or array of file extensions.fn{Function|Object}: orsettingssettings{Object}: Optionally pass engine options as the last argument.
Example
app.engine('hbs', require('engine-handlebars'));
// using consolidate.js
var engine = require('consolidate');
app.engine('jade', engine.jade);
app.engine('swig', engine.swig);
// get a registered engine
var swig = app.engine('swig');.setEngine
Register engine ext with the given render fn and/or settings.
Params
ext{String}: The engine to set.
Example
app.setEngine('hbs', require('engine-handlebars'), {
delims: ['<%', '%>']
});.getEngine
Get registered engine ext.
Params
ext{String}: The engine to get.
Example
app.engine('hbs', require('engine-handlebars'));
var engine = app.getEngine('hbs');Related projects
You might also be interested in these projects:
- base-task: base plugin that provides a very thin wrapper around https://github.com/doowb/composer for adding task methods to… more | homepage
- base-option: Adds a few options methods to base, like
option,enableanddisable. See the readme… more | homepage - base: base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… more | homepage
Contributing
This document was generated by [verb-readme-generator][] (a verb generator), please don't edit directly. Any changes to the readme must be made in .verb.md. See Building Docs.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue. Or visit the [verb-readme-generator][] project to submit bug reports or pull requests for the readme layout template.
Building docs
Generate readme and API documentation with verb:
$ npm install -g verb verb-readme-generator && verbRunning tests
Install dev dependencies:
$ npm install -d && npm testAuthor
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on June 27, 2016.