2017 © Pedro Peláez
 

library macdom

The best, highly customizable HTML preprocessor with many amazing features.

image

machy8/macdom

The best, highly customizable HTML preprocessor with many amazing features.

  • Thursday, May 10, 2018
  • by Machy8
  • Repository
  • 1 Watchers
  • 5 Stars
  • 148 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 8 Versions
  • 1 % Grown

The README.md

Macdom

Build Status Coverage Status Packagist License Join the chat at https://gitter.im/Machy8/Macdom, (*1)

  • For more information see WIKI (always up to date to the newest stable version)
  • Try it on CODEPEN (JavaScript version is always behind the php version so it may contain bugs and errors that have already been fixed in the PHP version)

Sample

Macdom ```` Slim !5 html head utf-8 viewport favicon includes/favicon.ico title Macdom example body h1 #title .titles .main-title Hello world nav @ a $http://www.[@].com $blank Link on - [google] .first-link Google [yahoo] Yahoo [github] Github div #wrapper Some text here. https://www.code.jquery.com/jquery-1.12.0.min.js async, (*2)


**Result** ```` html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta content="width=device-width" name="viewport"> <link rel="shortcut icon" href="includes/favicon.ico"> <title>Macdom example</title> </head> <body> <h1 id="title" class="titles main-title">Hello world</h1> <nav> <a target="blank" href="http://www.google.com" class="first-link">Link on - Google</a> <a target="blank" href="http://www.yahoo.com">Link on - Yahoo</a> <a target="blank" href="http://www.github.com">Link on - Github</a> </nav> <div id="wrapper"> Some text <b>here</b>. </div> <script async="" type="text/javascript" src="https://www.code.jquery.com/jquery-1.12.0.min.js"></script> </body> </html>

Requirements

  • PHP 7.0+
  • If you use Nette Framework - v2.3+

Installation

1 - Download the Macdom using composer:, (*3)

 composer require machy8/macdom

2 - Usage:, (*4)

Typical:, (*5)

$macdom = new Macdom\Engine;
$compiled = $macdom->compile($content);

Nette framework:, (*6)


use Macdom\Bridges\Latte\FileLoader; use Macdom\Engine; /** * @var Engine */ private $macdom; /** * @var FileLoader */ private $fileLoader; public function __construct(Engine $macdom, FileLoader $fileLoader) { $this->macdom = $macdom; $this->fileLoader = $fileLoader; } protected function createTemplate() { $template = parent::createTemplate(); $this->fileLoader->setMacdom($this->macdom); $template->getLatte()->setLoader($this->fileLoader); return $template; }

And add a config neon file with the following content (or try Composer synchronizer. It will do it for you automatically)., (*7)

extensions:
    macdom: Macdom\Bridges\Nette\MacdomExtension

macdom:
    debugger: TRUE

The Versions

10/05 2018

dev-master

9999999-dev

The best, highly customizable HTML preprocessor with many amazing features.

  Sources   Download

BSD-3-Clause New BSD License

The Requires

 

The Development Requires

by Vladimír Macháček

templating html minification preprocessor macdom

08/10 2017

v3.0.0

3.0.0.0

The best, highly customizable HTML preprocessor with many amazing features.

  Sources   Download

New BSD License

The Requires

 

The Development Requires

by Vladimír Macháček

templating html minification preprocessor macdom

30/09 2017

3.0.x-dev

3.0.9999999.9999999-dev

The best, highly customizable HTML preprocessor with many amazing features.

  Sources   Download

New BSD License

The Requires

 

The Development Requires

by Vladimír Macháček

templating html minification preprocessor macdom

14/05 2017

2.0.x-dev

2.0.9999999.9999999-dev

The best, highly customizable HTML preprocessor with many amazing features.

  Sources   Download

New BSD License

The Requires

  • php >=5.4.0

 

The Development Requires

by Vladimír Macháček

templating html minification preprocessor macdom

06/08 2016

v2.2.0

2.2.0.0

The best, highly customizable HTML preprocessor with many amazing features.

  Sources   Download

New BSD License

The Requires

  • php >=5.4.0

 

The Development Requires

by Vladimír Macháček

templating html minification preprocessor macdom

07/06 2016

v2.1.0

2.1.0.0

HTML preprocessor

  Sources   Download

New BSD License

The Requires

  • php >=5.4.0

 

by Vladimír Macháček

html preprocessor macdom

29/04 2016

v2.0.0

2.0.0.0

HTML and template preprocessor

  Sources   Download

New BSD License

The Requires

  • php >=5.3.0

 

by Vladimír Macháček

html preprocessor macdom

30/03 2016

v1.3.0

1.3.0.0

HTML and template preprocessor

  Sources   Download

New BSD License

The Requires

  • php >=5.3.0

 

by Vladimír Macháček

html preprocessor macdom