Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
base-engines
Advanced tools
Readme
Adds support for managing template engines to your base application.
Install with npm:
$ npm install --save base-engines
Register the plugin with your base application:
var Base = require('base');
var engines = require('base-engines');
base.use(engines());
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}: or settings
settings
{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');
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: ['<%', '%>']
});
Get registered engine ext
.
Params
ext
{String}: The engine to get.Example
app.engine('hbs', require('engine-handlebars'));
var engine = app.getEngine('hbs');
option
, enable
and disable
. See the readme… more | homepagePull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Commits | Contributor |
---|---|
6 | jonschlinkert |
4 | doowb |
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
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:
$ npm install && npm test
Jon Schlinkert
Copyright © 2017, Jon Schlinkert. MIT
This file was generated by verb-generate-readme, v0.4.2, on February 21, 2017.
FAQs
Adds support for managing template engines to your base application.
The npm package base-engines receives a total of 40,515 weekly downloads. As such, base-engines popularity was classified as popular.
We found that base-engines demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.