JSPM

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

Marko views for Rill.

Package Exports

  • @rill/marko

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 (@rill/marko) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Rill
@rill/marko [WIP]
API stability Standard NPM version Downloads Gitter Chat

Universal Marko rendering middleware for Rill.

Installation

npm install @rill/marko

Example

const app = require('rill')()
const page = require('@rill/page')
const render = require('@rill/marko')

// Setup the document template.
app.get(page
  .meta({ charset: 'utf8' })
  .title('My Marko App')
  .meta({ name: 'author', content: 'Dylan Piercey' })
  .meta({ name: 'descripton', content: 'Universal JS is awesome' })
  .link({ rel: 'stylesheet', href: 'index.css' })
  .script({ src: 'index.js', async: true })
)

// Set locals in middleware.
app.use(({ locals }), next)=> {
    locals.title = '@rill/marko'
    return next()
})

// Render a Marko template.
const HomeTemplate = require('./home.marko')
app.get('/home', render(HomeTemplate))

Contributions

  • Use npm test to run tests.

Please feel free to create a PR!