vext

0.1.4 • Public • Published

VEXT

Velocity for express.js

Usage

First of all, install it with npm.

npm install --save-dev vext

Then write some codes in the entry file of express.js, such as app.js.

var vext = require("vext");
 
// Set Velocity as the view engine
app.set("view engine", "vm");
// Use VEXT to render files
app.engine("vm", vext.__express);

You can view examples for detail. ;-)

APIs

There is only one API now. :-(

.set(key, value)

To rewrite the default settings of VEXT.

// The default layout is `template/layouts/default.vm`,
// to change it to `template/layouts/admin.vm`.
vext.set("layout", "template/layouts/admin.vm");

Package Sidebar

Install

npm i vext

Weekly Downloads

4

Version

0.1.4

License

MIT

Last publish

Collaborators

  • ourai