jumplink / jade.php
HAML-like template engine for PHP 5.3
1.0.0
2015-10-05 17:32 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2024-05-15 09:24:28 UTC
README
Jade.php adds inline PHP scripting support to the Jade template compiler.
Implementation details
The fork is a complete rewrite, all the code is ported from the original jade project.
All the features from the original are supported but undertested, including inheritance and mixins.
Syntax
See original Jade Docs.
Examples
Render
namespace Jade; require __DIR__ . '/vendor/autoload.php'; $jade = new Jade('/tmp', true); echo $jade->render('index.jade');
Cache with Variables
namespace Jade; require __DIR__ . '/vendor/autoload.php'; $jade = new Jade('/tmp', true); $title = "Hello World"; $header = "this is append"; require $jade->cache('index.jade');
Try out the Example in this Repository
git clone https://github.com/JumpLink/jade.php.git
cd jade.php/example
php -S localhost:8000
xdg-open http://localhost:8000/main.php
xdg-open http://localhost:8000/variables.php
Tests
Note: Tests need to be fixed!
git clone https://github.com/JumpLink/jade.php.git
cd jade.php
composer install
php vendor/bin/phpunit src/tests/EachTest.php
Notes
Please check the git commit history for the authoritative list of contributors.