No description, website, or topics provided.
JavaScript
Switch branches/tags
Nothing to show
Latest commit b1b149e Dec 9, 2014 @viniwrubleski viniwrubleski Merge pull request #8 from ZoRDoK/master
php variable class, fix constantinople warning
Permalink
Failed to load latest commit information.
lib add php class selector for attributes Nov 25, 2014
test add php class selector for attributes Nov 25, 2014
.editorconfig
.gitignore Initial commit. Nov 21, 2013
Readme.md Add examples Nov 22, 2013
index.js Make passing in jade optional. Feb 21, 2014
package.json add php class selector for attributes Nov 25, 2014

Readme.md

Jade-PHP

Adds the possibility of compiling PHP for Jade

Usage

var jade = require('jade');
var jadephp = require('jade-php');

jadephp(jade);

var html = jade.render('string of jade');

Example

The following code:

!!!
html
    head
        title= $title

    body
        ul
            - foreach ($this->list as $list):
                li!= $list
            - endforeach

Will produce:

<!DOCTYPE html>
<html>
    <head>
        <title><?php echo htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); ?></title>
    </head>

    <body>
        <ul>
            <?php foreach ($this->list as $list): ?>
                <li><?php echo $list; ?></li>
            <?php endforeach; ?>
        </ul>
    </body>
</html>