PHPackages                             chh/pipe - 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. chh/pipe

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

chh/pipe
========

Put your assets into the Pipe and smoke them.

v1.0.0beta1(13y ago)1202.5k9[14 issues](https://github.com/CHH/pipe/issues)1MITPHPPHP &gt;=5.3.3CI failing

Since Dec 28Pushed 12y ago9 watchersCompare

[ Source](https://github.com/CHH/pipe)[ Packagist](https://packagist.org/packages/chh/pipe)[ Docs](https://github.com/CHH/pipe)[ RSS](/packages/chh-pipe/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (13)Versions (5)Used By (1)

Pipe
====

[](#pipe)

*Put your assets into the pipe and smoke them.*

Pipe is an asset pipeline in the spirit of [Sprockets](https://github.com/sstephenson/sprockets). It's meant as the practical way for managing assets. It aims to provide a useful out of the box setup for managing assets and support for common preprocessor languages found in the web environment, like CoffeeScript or LESS.

What Pipe provides for you:

- Out of the box support for [Less](http://lesscss.org) and [CoffeeScript](http://coffeescript.org/)
- Integrated **Dependency Managment**.
- Support for multiple **asset load paths**, which allows you to untie your *application's libraries* from your *vendor libraries*.
- Tries to take the pain out of asset deployment, by being designed for dealing with **cache busting** and **compression**.

[![Build Status](https://camo.githubusercontent.com/8b27595e8eb7a28927342ab8160de70c7a8731510b9476e098ba382c43b1d835/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f4348482f706970652e706e67)](http://travis-ci.org/CHH/pipe)

Install
-------

[](#install)

Get composer (if you haven't):

```
wget http://getcomposer.org/composer.phar

```

Then add this to a `composer.json` in your project's root:

```
{
    "require": {
        "chh/pipe": "*"
    }
}

```

Now install:

```
php composer.phar install

```

Getting Started
---------------

[](#getting-started)

### Environment

[](#environment)

First you need an instance of `Pipe\Environment`. The environment holds your load paths, is used to retrieve assets and maps processors/engines to your assets.

The environment consists of multiple load paths. When retrieving an asset, it's looked up in every directory of the load paths. This way you can split your assets up in multiple directories, for example `vendor_assets` and `assets`.

To add some load paths, use the `appendPath` method. Paths can be prepended by the `prependPath` method. But use this carefully, because you can override assets this way.

```
