Package Exports
- yeps-views
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (yeps-views) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
YEPS Views
YEPS Template rendering
Template engines
YEPS Views is using consolidate under the hood.
How to install
npm i -S yeps-viewsHow 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
- yeps - YEPS
- yeps-promisify - YEPS kernel
- yeps-benchmark - performance comparison koa2, express and node http
- yeps-router - YEPS promise based router
- yeps-error - YEPS 404/500 error handler
- yeps-redis - YEPS promise based redis client
- yeps-mysql - YEPS promise based mysql client
- yeps-boilerplate - YEPS app boilerplate
- yeps-express-wrapper - YEPS express wrapper
- yeps-cors - YEPS CORS
- yeps-bodyparser - YEPS body parser
- yeps-method-override - YEPS method override
