PHPackages                             joseym/li3\_frontender - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. joseym/li3\_frontender

ActiveLithium-library[Utility &amp; Helpers](/categories/utility)

joseym/li3\_frontender
======================

Lithium PHP asset extension

142052PHP

Since Oct 21Pushed 12y ago2 watchersCompare

[ Source](https://github.com/joseym/li3_frontender)[ Packagist](https://packagist.org/packages/joseym/li3_frontender)[ RSS](/packages/joseym-li3-frontender/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Assets Plugin for [li3](http://lithify.me)
==========================================

[](#assets-plugin-for-li3)

---

> This is my second draft of an Assets plugin for Lithium PHP. The first was a great learning experiance but I've decided there are a number of things I would change.

---

This Plugin now uses the awesome [Assetic](https://github.com/kriswallsmith/assetic) library to power many of it's features.

Installation
------------

[](#installation)

There are several ways to grab and use this project:

### Use Composer

[](#use-composer)

**Best Option (default)**

> Other install options require a configuration parameter be set in `Libraries::add()`[More on that later](https://github.com/joseym/li3_frontender#configuration-options).

Modify your projects `composer.json` file

```
{
    "require": {
    	...
        "joseym/li3_frontender": "master"
        ...
    }
}
```

Run `php composer.phar install` (or `php composer.phar update`) and, aside from adding it to your Libraries, you should be good to go.

### Load via Submodule

[](#load-via-submodule)

**More manual, bleh. Seriously, Composer is awesome**

> This option requires that you tell the plugin you are not using `composer`. [See library option (`source`)](https://github.com/joseym/li3_frontender#configuration-options)

1. Clone/Download the plugin into your app's `libraries` directory.
2. Tell your app to load the plugin by adding the following to your app's `config/bootstrap/libraries.php`:

    Libraries::add('li3\_frontender', array('source' =&gt; 'submodule'));

    > Important to set the source to something else as 'composer'. Configuration options are available, standby
3. Pull in the the project dependencies.

> Currently dependancies include [Assetic](https://github.com/kriswallsmith/assetic#readme), [Symfony/Process](https://github.com/symfony/Process#readme) and [LessPHP](https://github.com/leafo/lessphp#readme).

```
$ cd app/libraries/li3_frontender
$ git submodule init
$ git submodule update

```

Usage
-----

[](#usage)

> If you use coffee script you will have to ensure [Node.JS](http://nodejs.org/) and [CoffeeScript](http://http://coffeescript.org) are running on your server.

This project also comes packaged with [YUI Compressor](http://yuilibrary.com/download/yuicompressor/), which Assetic uses for compression of JS and CSS assets.

Currently this project supports the following frontend tools:

1. LessCSS compiling
2. CoffeeScript compiling
3. Instant cache busting thru unique filenames
4. CSS/JS Compression

The project comes bundled with it's own [Helper](https://github.com/joseym/li3_frontender/blob/assetic/extensions/helper/Assets.php), here's how use use it.

### Linking Stylesheets

[](#linking-stylesheets)

You assign page styles much like you would with the out-of-the-box Html helper

```
