JSPM

yeps-views

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q63059F
  • License MIT

YEPS Views

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

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!' });
});