8000 Proposed a new article about using pure PHP libraries with Assetic by javiereguiluz · Pull Request #5166 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Proposed a new article about using pure PHP libraries with Assetic #5166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 27, 2015
Merged
Prev Previous commit
Next Next commit
Added more configuration formats
  • Loading branch information
javiereguiluz committed Apr 14, 2015
commit 85e6a543c0676c33988f840a4e8be7b5637374aa
43 changes: 35 additions & 8 deletions cookbook/frontend/assetic_php.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,41 @@ Combining and Minimizing CSS Files and Compiling SCSS Files

First, configure a new ``scssphp`` Assetic filter as follows:

.. code-block:: yaml

# app/config/config.yml
assetic:
filters:
scssphp:
formatter: "Leafo\\ScssPhp\\Formatter\\Compressed"
# ...
.. configuration-block::

.. code-block:: yaml

# app/config/config.yml
assetic:
filters:
scssphp:
formatter: "Leafo\\ScssPhp\\Formatter\\Compressed"
# ...

.. code-block:: xml

<!-- app/config/config.xml -->
<?xml version="1.0" charset="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:assetic="http://symfony.com/schema/dic/assetic">

<assetic:config>
<filter name="scssphp" formatter="Leafo\ScssPhp\Formatter\Compressed" />
<!-- ... -->
</assetic:config>
</container>

.. code-block:: php

// app/config/config.php
$container->loadFromExtension('assetic', array(
'filters' => array(
'scssphp' => array(
'formatter' => 'Leafo\ScssPhp\Formatter\Compressed',
),
// ...
),
));

The value of the ``formatter`` option is the fully qualified class name of the
formatter used by the filter to produce the compiled CSS file. Using the
Expand Down
0