2017 © Pedro Peláez
 

library picojade

Simple Jade parser

image

undercloud/picojade

Simple Jade parser

  • Sunday, April 10, 2016
  • by undercloud
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

picojade

Basic Jade Parser, (*1)

install

composer require undercloud/picojade, (*2)

usage

  require 'vendor/autoload.php';

  $jade = new Undercloud\PicoJade;
  $template = file_get_contents(__DIR__ . '/index.jade');

  echo $jade->compile($template);

doctype

!!! 5
Avail values
* 5 * xml * default * transitional * strict * frameset * 1.1 * basic * mobile, (*3)

comment

<!-- html comment -->
//single comment, (*4)

// multi
   line
   comment

tag

h1 Header
#block
.classname
div#block.classname.another, (*5)

single

input(type="checkbox" value="self closing" checked)
foo(data-src="force closing")/
a(href="http://link.to"): img(src="/path/to") Link with image and text, (*6)

text

p Lorem ipsum, (*7)

script.
  if(true)
    console.log("It's true")

attr

span(id="someid" class="classname" data-src="true"), (*8)

php

<?php $s = "Singleline php code" ?>

The Versions

10/04 2016

dev-master

9999999-dev https://github.com/undercloud/picojade

Simple Jade parser

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar undercloud

parser slim jade haml