pug-php/pug-assets

Pug template assets manager

Maintainers

👁 kylekatarn

Package info

github.com/pug-php/pug-assets

pkg:composer/pug-php/pug-assets

Statistics

Installs: 88 701

Dependents: 4

Suggesters: 0

Stars: 4

Open Issues: 0

1.1.4 2021-05-02 15:34 UTC

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT adb421f79182ff73c52702bbe6fe7322fbf4ffc9

  • Kyle Katarn <kylekatarnls.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-29 01:05:54 UTC


README

👁 Latest Stable Version
👁 Build Status
👁 StyleCI
👁 Test Coverage
👁 Code Climate

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

Install

First you need composer if you have'nt yet: https://getcomposer.org/download/

Then in the root directory of your project, open a terminal and enter:

composer require pug-php/pug-assets

Enable the plugin:

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

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