Download the PHP package glorpen/compass-connector-bundle without Composer
On this page you can find all versions of the php package glorpen/compass-connector-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download glorpen/compass-connector-bundle
More information about glorpen/compass-connector-bundle
Files in glorpen/compass-connector-bundle
Package compass-connector-bundle
Short Description Symfony2 bundle for AsseticCompassConnector filter
License GPL-3.0
Homepage https://bitbucket.org/glorpen/glorpencompassconnectorbundle
Informations about the package compass-connector-bundle
..
This project is now DEPRECATED. Currently there are better alternatives, please use those in new projects.
GlorpenCompassConnectorBundle
The better Compass integration for Symfony2.
For forking and other funnies:
- https://bitbucket.org/glorpen/glorpencompassconnectorbundle
- https://github.com/glorpen/GlorpenCompassConnectorBundle
What problems is it solving?
This bundle:
- adds bundle namespace for compass files - so you can do cross bundle imports or use assets from other bundle
- ... and it should enable distributing bundles with compass assets
- you don't need installed assets in
your_app/web
- connector uses files from eg.SomeBundle/Resources
dir - 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);
- for referencing files inside
app/Resources
dir use just@somefile.png
(sprites, inline images, scss imports)
How to install
- first, you need to install ruby connector gem:
- add requirements to composer.json:
- enable the bundle in your AppKernel class
app/AppKernel.php
- add assetic filter config in config.yml
If you are running into following error:
Scope Widening Injection detected: The definition "assetic.filter.compass_connector.resolver" references the service "templating.asset.default_package" which belongs to a narrower scope. Generally, it is safer to either move "assetic.filter.compass_connector.resolver" to scope "request" or alternatively rely on the provider pattern by injecting the container itself, and requesting the service "templating.asset.default_package" each time it is needed. In rare, special cases however that might not be necessary, then you can set the reference to strict=false to get rid of this error.
... or if you just want to change generated assets url (for eg. CDN).
You need to add following configuration to you project (remember to change urls):
Usage
There are five kind of "paths":
- app: looks like
@MyBundle:public/images/asset.png
- app global: cannot be converted to URL, looks like
@data/image.png
and will resolve toapp/Resources/data/image.png
- absolute: starts with single
/
, should be publicly available, will resolve toweb/
- 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:
This bundle uses Assetic and CompassConnector filter name is compass_connector
.
Confguration
You can change default configuration by setting following DIC parameters:
As for `assetic.filter.compass_connector.plugins` you can provide arguments as a list eg. `["zurb-foundation"]` or array with required gem version: `{"zurb-foundation":">=4"}`
All versions of compass-connector-bundle with dependencies
kriswallsmith/assetic Version *
glorpen/assetic-compass-connector Version >=0.2.2
symfony/symfony Version 2.*