Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/jamesmartin/tvos-pug
- Owner: jamesmartin
- Created: 2015-11-17T07:46:31.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-22T12:16:54.000Z (over 8 years ago)
- Last Synced: 2024-09-26T10:09:07.197Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
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.pugvar tvOSPug = require('tvos-pug');
var tvml = tvOSPug.renderTemplate('Index.xml.js', {"some": "locals"})
```