Skip to content

orbt/OrbtStyleMirrorBundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Style Mirror Bundle

Symfony dependency injection bundle for the Style Mirror library.

This bundle provides the following services:

  • orbt_style_mirror.css.aggregator: CSS aggregator service. This aggregates a collection of CSS resources with potentially different media types into a single resource.
  • orbt_style_mirror.css.scanner: Utility for scanning linked resources from a style sheet.
  • orbt_style_mirror.css.linked_fetcher: Resource materialize event subscriber. See Configuration below to subscribe the fetcher automatically to the resource mirror.

Installation using Composer

Add the following to the "require" list in your composer.json file:

    "orbt/style-mirror-bundle": "dev-master"

Run composer to update dependencies:

$ composer update

Or to just download this bundle:

$ composer update orbt/style-mirror-bundle

Register this bundle in the application kernel:

<?php
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Orbt\Bundle\StyleMirrorBundle\OrbtStyleMirrorBundle(),
        // ...
    );

    return $bundles;
}

Configuration

The style mirror is configured under the key orbt_style_mirror. There are two options:

  • aggregate_prefix: The prefix of the generated file name of the aggregated style sheet. This can be used to fix the base in a Symfony application for routing matching requests to a controller.
  • fetch_linked_resource: If true, the linked resource fetcher is automatically subscribed to the resource mirror service from the resource mirror bundle.

License

This library is licensed under the MIT License. See the LICENSE file for detailed license information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages