0.0.1 • Published 7 years ago

yeps-views v0.0.1

Weekly downloads
6
License
MIT
Repository
github
Last release
7 years ago

YEPS Views

YEPS Template rendering

NPM

npm version Build Status Coverage Status Linux Build Windows Build

Dependency Status devDependency Status NSP Status

License GitHub stars GitHub forks GitHub issues Twitter

Template engines

YEPS Views is using consolidate under the hood.

List of supported engines

How to install

npm i -S yeps-views

How to use

views/index.jsx

const React = require('react');

module.exports =  props => <h1>{props.text}</h1>;

app.js

const App = require('yeps');
const views = require('yeps-views');

const app = new App();

app.all([
    views(__dirname + '/views', { engine: 'react' });
]);

app.then(async ctx => {
    return ctx.render('index.jsx', { text: 'Hello!' });
});

Links