evheniy / yeps-views

yeps-views

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

yeps-views

License:MIT License


Languages

Language:JavaScript 100.0%