New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

weiv

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

weiv

Web Engine Intravenous Viewer

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

WEIV

WEIV

WEIV is a function-ware designed to act as a function based middle-ware for view engines. The ideology behind it is based on the concept of a view backwards (IE: weiv).

INSTALLING

Git a copy from the repo and run npm install or use

npm install weiv --save

USING

Basic usage using express.js and vinegar.js:

Your main express.js script:

var weiv = require('weiv');
var config_weiv = require('./configs/vinegar.js'),
    weiv_config = weiv.configure(config_weiv,appdir);

app.use(function( req, res, next) {
	res.weiv = weiv;
	next();
});

// now use vinegar.express
app.get('/', function(req, res) {
	var template = "./views/index.html";
	vinegar.express(template,res,[{
	  res.weiv.view(template, res, [{VARIABLE: "Hello World"}]);
	});
});

configs/weiv.js:

var Vinegar = require('vinegar');

module.exports = {
	engine: "Vinegar",
        script: "/path/to/assets/js/vinegar/Vinegar.js",
	init: {
		loads_templates: true
	},
	view: function (template, res, data) { return Vinegar.node(template, res, data) } // Raw Method

}

See the examples folder for the completed example.

#CONTRIBUTING

We encourage forking. Feel free to fork & pull your new additions, or bug fixes.

#LICENSE MIT

Keywords

view

FAQs

Package last updated on 14 Jun 2015

Did you know?

Socket

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.

Install

Related posts