Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oroce/node-jadeify2
https://github.com/oroce/node-jadeify2
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/oroce/node-jadeify2
- Owner: oroce
- Created: 2013-04-12T12:37:33.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-04-12T12:42:03.000Z (over 11 years ago)
- Last Synced: 2024-04-14T14:45:48.221Z (9 months ago)
- Language: JavaScript
- Size: 101 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-jadeify2 [![Build Status](https://travis-ci.org/OliverJAsh/node-jadeify2.png)](https://travis-ci.org/OliverJAsh/node-jadeify2)
Browserify 2 transformer for precompiling client-side Jade templates.
## Installation
```
$ npm install jadeify2
```## Usage
``` js
var
browserify = require('browserify'),
jadeify2 = require('jadeify2')var bundle = browserify()
bundle.transform(jadeify2)
```In order for jadeify2 to know whether the required module is a Jade template or not, we must provide the file extension in the `require`:
``` js
var template = require('./templates/example.jade')
```To use on the command line, run `browserify` with the `--transform`/`-t` flag:
```
$ npm install jadeify2
$ browserify -t jadeify2 main.js > bundle.js
```## Licence
Licenced under the [New BSD License](http://opensource.org/licenses/bsd-license.php)