2017 © Pedro Peláez
 

library pug-assets

Pug template assets manager

image

pug-php/pug-assets

Pug template assets manager

  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 11 Versions
  • 17 % Grown

The README.md

Pug-Assets

Latest Stable Version Build Status StyleCI Test Coverage Code Climate, (*1)

Manage your assets and third-party transpiler (less, stylus, coffee, babel, etc.) and allow you to concat and/or minify them in production environment., (*2)

Install

First you need composer if you have'nt yet: https://getcomposer.org/download/, (*3)

Then in the root directory of your project, open a terminal and enter:, (*4)

composer require pug-php/pug-assets

Enable the plugin:, (*5)

use Pug\Assets;
use Pug\Pug;

$pug = new Pug();

// The facade syntax:
Assets::enable($pug);
$pug->render('... minify ...'); // here you can use minfiy, assets or concat keywords to wrap your assets

Assets::disable($pug);
$pug->render('... minify ...'); // here minfiy, assets or concat are simple tags again

// Or the instanciation syntax:
$assets = new Assets($pug);
$pug->render('... minify ...'); // here you can use minfiy, assets or concat keywords to wrap your assets

unset($assets);
$pug->render('... minify ...'); // here minfiy, assets or concat are simple tags again

For more information about the concat/minify usage, see https://github.com/pug-php/pug-minify#readme, (*6)

Pug-Assets also instal the coffee, react-jsx, stylus, less and markdown pug filters to use them as inline contents., (*7)

The Versions