Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jamesmartin/tvos-pug

Write TVML templates in Pug (Formerly Jade) and wrap them in Javascript functions for use in a TVOS application
https://github.com/jamesmartin/tvos-pug

Last synced: 2 months ago
JSON representation

Write TVML templates in Pug (Formerly Jade) and wrap them in Javascript functions for use in a TVOS application

Awesome Lists containing this project

README

        

# tvos-pug

Write TVML templates in Pug (formerly know as Jade) and wrap them in Javascript functions for use in a TVOS application

Entirely motivated by ground-breaking experiments on TVML by [@2metres](https://github.com/2metres).

One man's hatred of XML *can* make a difference.

## Install

`npm install tvos-pug`

## Use

```javascript
// Assume a directory structure like this:
// .
// this_file.js
// templates/
// ⌞ Index.xml.js.pug
// ⌞ Other.xml.js.pug

var tvOSPug = require('tvos-pug');

var tvml = tvOSPug.renderTemplate('Index.xml.js', {"some": "locals"})
```