PHPackages                             glorpen/assetic-compass-connector - 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. glorpen/assetic-compass-connector

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

glorpen/assetic-compass-connector
=================================

Assetic Compass filter

v0.2.3(9y ago)166521GPL-3.0PHPPHP &gt;=5.3.1

Since Jun 5Pushed 9y ago1 watchersCompare

[ Source](https://github.com/glorpen/AsseticCompassConnector)[ Packagist](https://packagist.org/packages/glorpen/assetic-compass-connector)[ Docs](https://bitbucket.org/glorpen/asseticcompassconnector)[ RSS](/packages/glorpen-assetic-compass-connector/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (10)Used By (1)

> **This project is now DEPRECATED. Currently there are better alternatives, please use those in new projects.**

Glorpen AsseticCompassConnector
-------------------------------

[](#glorpen-asseticcompassconnector)

The better Compass integration for your PHP project.

For forking and other funnies:

-
-

### What problems is it solving?

[](#what-problems-is-it-solving)

This Assetic filter:

- provides a way to closely integrate Compass with any framework - you just have to write simple *Resolver* for your project
- adds bundle/plugins/package namespace for compass files - so you can do cross-plugin imports or use assets from other packages
    - ... and it could enable distributing bundles with Compass assets
- your *Resolver* provides required files - so it can support any project structure
- assets recompiling/updating when any of its dependencies are modified - be it another import, inlined font file or just `width: image-width(@SomeBundle:public/myimage.png);`

### Available Resolvers

[](#available-resolvers)

- Symfony2 -

### How to install

[](#how-to-install)

- first, you need to install ruby connector gem:

```
gem install compass-connector
```

- add requirements to composer.json:

```
{
    "require": {
        "glorpen/assetic-compass-connector": "*"
    }
}
```

### Virtual Paths

[](#virtual-paths)

There are four kinds of "paths":

- app: looks like `@MyBundle:public/images/asset.png`
- absolute path: starts with single `/`, should only be used in resolving on-disk file and url prefixing, it is always a public file
- vendor: a relative path, should be used only by compass plugins (eg. zurb-foundation, blueprint)
- absolute path: starts with `//`, `http://` etc. and will NOT be changed by connector

Some examples:

```
@import "@SomeBundle:scss/settings"; /* will resolve to src/SomeBundle/Resources/scss/_settings.scss */
@import "foundation"; /* will include foundation scss from your compass instalation */

width: image-size("@SomeBundle:public/images/my.png"); /* will output image size of SomeBundle/Resources/public/images/my.png */
background-image: image-url("@SomeBundle:public/images/my.png"); /* will generate url with prefixes given by Symfony2 config */
@import "@SomeBundle:sprites/*.png"; /* will import sprites located in src/SomeBundle/Resources/sprites/ */
```

### Usage

[](#usage)

This filter's Assetic name is `compass_connector`.

You can compile assets as in any Assetic filter:

```
