jade-php

0.1.4 • Public • Published

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>

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.4
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.4
    4
  • 0.1.2
    0
  • 0.1.1
    35
  • 0.1.0
    0

Package Sidebar

Install

npm i jade-php

Weekly Downloads

39

Version

0.1.4

License

MIT

Last publish

Collaborators

  • viniwrubleski