2017 © Pedro Peláez
 

library asseticanesthetic

An abstraction layer to enable managing of assets via a config array. A different way of implementing Assetic.

image

rob-mccann/asseticanesthetic

An abstraction layer to enable managing of assets via a config array. A different way of implementing Assetic.

  • Thursday, March 7, 2013
  • by unforeseen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

AsseticAnesthetic

An abstraction layer to enable managing of assets via a config array. A different way of implementing Assetic., (*1)

Installation

Installation is via Composer. Add the following to your composer.json file., (*2)

{
    "require": {
        "rob-mccann/asseticanesthetic": "0.1"
    }
}

Run composer install, (*3)

Features

  1. Generate assets based on configuration
  2. Keeps MVC, no need for

<, (*4)

script src="assets.php"> 3. Quick to install and use 4. Ideal for small, quick projects where delivery is a higher requirement than raw performance, (*5)

Usage

This project is framework independent. You can use it in almost any PHP project. First, you'll need to create a new object and pass it in our wonderful config array (see the examples to see what to pass in here)., (*6)

$assets = new \AsseticAnesthetic\SimpleAssetManager($config);

You can then call $assets->renderJs() and $assets->renderCss() to render the HTML tags., (*7)

Most of the time, you'll want to load $config from your frameworks Config class. In Laravel and FuelPHP, it's something along the lines of $config = Config::read('assets')., (*8)

Enabling / Disabling groups

Before you call the render functions, you can override your config to enable or disable groups., (*9)

// the following will enable jQuery UI if it exists, but
// will then disable the jquery-ui css from being processed and shown
$assets->enable('jquery-ui');
$assets->disable('jquery-ui', SimpleAssetManager::CSS);

Todo

  1. Write proper tests
  2. Implement more filters
  3. Improve documentation

The Versions

07/03 2013

dev-master

9999999-dev https://github.com/robmccann/asseticanesthetic

An abstraction layer to enable managing of assets via a config array. A different way of implementing Assetic.

  Sources   Download

MIT

The Requires

 

helper assets utility assetic asset manager

07/03 2013

v0.1

0.1.0.0 https://github.com/robmccann/asseticanesthetic

An abstraction layer to enable managing of assets via a config array. A different way of implementing Assetic.

  Sources   Download

MIT

The Requires

 

helper utility assetic asset manager