jade-drupal

0.1.3 • Public • Published

Jade-PHP-Drupal

Adds the possibility of compiling PHP for Jade for Drupal

Usage

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

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>

Readme

Keywords

Package Sidebar

Install

npm i jade-drupal

Weekly Downloads

1

Version

0.1.3

License

MIT

Last publish

Collaborators

  • yograf