Skip to content

Commit

Permalink
[#5973] some minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Dec 14, 2015
1 parent 433dd04 commit 168072b
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 48 deletions.
6 changes: 1 addition & 5 deletions best_practices/web-assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ much more concise:
Using Assetic
-------------

.. caution::

Starting from Symfony 2.8, Assetic is no longer included by default in the
Symfony Standard Edition. Refer to :doc:`this article </cookbook/assetic/asset_management>`
to learn how to install and enable Assetic in your Symfony application.
.. include:: /cookbook/assetic/_standard_edition_warning.inc

These days, you probably can't simply create static CSS and JavaScript files
and include them in your template. Instead, you'll probably want to combine
Expand Down
5 changes: 5 additions & 0 deletions cookbook/assetic/_standard_edition_warning.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. caution::

Starting from Symfony 2.8, Assetic is no longer included by default in the
Symfony Standard Edition. Refer to :doc:`this article </cookbook/assetic/asset_management>`
to learn how to install and enable Assetic in your Symfony application.
6 changes: 1 addition & 5 deletions cookbook/assetic/apply_to_option.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
How to Apply an Assetic Filter to a specific File Extension
===========================================================

.. caution::

Starting from Symfony 2.8, Assetic is no longer included by default in the
Symfony Standard Edition. Refer to :doc:`this article </cookbook/assetic/asset_management>`
to learn how to install and enable Assetic in your Symfony application.
.. include:: /cookbook/assetic/_standard_edition_warning.inc

Assetic filters can be applied to individual files, groups of files or even,
as you'll see here, files that have a specific extension. To show you how
Expand Down
14 changes: 6 additions & 8 deletions cookbook/assetic/asset_management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ AsseticBundle executing this console command in your project:
$ composer require symfony/assetic-bundle
Then, enable the bundle in the ``AppKernel`` file of your Symfony application::
Then, enable the bundle in the ``AppKernel.php`` file of your Symfony application::

// app/AppKernel.php

Expand Down Expand Up @@ -44,8 +44,8 @@ your application:
# app/config/config.yml
assetic:
debug: "%kernel.debug%"
use_controller: false
debug: '%kernel.debug%'
use_controller: '%kernel.debug%'
filters:
cssrewrite: ~
Expand All @@ -57,12 +57,11 @@ your application:
<?xml version="1.0" encoding="UTF-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:framework="http://symfony.com/schema/dic/symfony"
xmlns:twig="http://symfony.com/schema/dic/twig"
xmlns:assetic="http://symfony.com/schema/dic/assetic"
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd
http://symfony.com/schema/dic/symfony
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
http://symfony.com/schema/dic/assetic
http://symfony.com/schema/dic/assetic/assetic-1.0.xsd">
<assetic:config debug="%kernel.debug%" use-controller="%kernel.debug%">
<assetic:filters cssrewrite="null" />
Expand All @@ -74,7 +73,6 @@ your application:
.. code-block:: php
// app/config/config.php
$container->loadFromExtension('assetic', array(
'debug' => '%kernel.debug%',
'use_controller' => '%kernel.debug%',
Expand Down
6 changes: 1 addition & 5 deletions cookbook/assetic/index.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
Assetic
=======

.. caution::

Starting from Symfony 2.8, Assetic is no longer included by default in the
Symfony Standard Edition. Refer to :doc:`this article </cookbook/assetic/asset_management>`
to learn how to install and enable Assetic in your Symfony application.
.. include:: /cookbook/assetic/_standard_edition_warning.inc

.. toctree::
:maxdepth: 2
Expand Down
6 changes: 1 addition & 5 deletions cookbook/assetic/jpeg_optimize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
How to Use Assetic for Image Optimization with Twig Functions
=============================================================

.. caution::

Starting from Symfony 2.8, Assetic is no longer included by default in the
Symfony Standard Edition. Refer to :doc:`this article </cookbook/assetic/asset_management>`
to learn how to install and enable Assetic in your Symfony application.
.. include:: /cookbook/assetic/_standard_edition_warning.inc

Among its many filters, Assetic has four filters which can be used for on-the-fly
image optimization. This allows you to get the benefits of smaller file sizes
Expand Down
6 changes: 1 addition & 5 deletions cookbook/assetic/php.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
Combining, Compiling and Minimizing Web Assets with PHP Libraries
=================================================================

.. caution::

Starting from Symfony 2.8, Assetic is no longer included by default in the
Symfony Standard Edition. Refer to :doc:`this article </cookbook/assetic/asset_management>`
to learn how to install and enable Assetic in your Symfony application.
.. include:: /cookbook/assetic/_standard_edition_warning.inc

The official Symfony Best Practices recommend to use Assetic to
:doc:`manage web assets </best_practices/web-assets>`, unless you are
Expand Down
6 changes: 1 addition & 5 deletions cookbook/assetic/uglifyjs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
How to Minify CSS/JS Files (Using UglifyJS and UglifyCSS)
=========================================================

.. caution::

Starting from Symfony 2.8, Assetic is no longer included by default in the
Symfony Standard Edition. Refer to :doc:`this article </cookbook/assetic/asset_management>`
to learn how to install and enable Assetic in your Symfony application.
.. include:: /cookbook/assetic/_standard_edition_warning.inc

`UglifyJS`_ is a JavaScript parser/compressor/beautifier toolkit. It can be used
to combine and minify JavaScript assets so that they require less HTTP requests
Expand Down
6 changes: 1 addition & 5 deletions cookbook/assetic/yuicompressor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ How to Minify JavaScripts and Stylesheets with YUI Compressor
**strongly advised to avoid using YUI utilities** unless strictly necessary.
Read :doc:`/cookbook/assetic/uglifyjs` for a modern and up-to-date alternative.

.. caution::

Starting from Symfony 2.8, Assetic is no longer included by default in the
Symfony Standard Edition. Refer to :doc:`this article </cookbook/assetic/asset_management>`
to learn how to install and enable Assetic in your Symfony application.
.. include:: /cookbook/assetic/_standard_edition_warning.inc

Yahoo! provides an excellent utility for minifying JavaScripts and stylesheets
so they travel over the wire faster, the `YUI Compressor`_. Thanks to Assetic,
Expand Down
6 changes: 1 addition & 5 deletions reference/configuration/assetic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
AsseticBundle Configuration ("assetic")
=======================================

.. caution::

Starting from Symfony 2.8, Assetic is no longer included by default in the
Symfony Standard Edition. Refer to :doc:`this article </cookbook/assetic/asset_management>`
to learn how to install and enable Assetic in your Symfony application.
.. include:: /cookbook/assetic/_standard_edition_warning.inc

Full Default Configuration
--------------------------
Expand Down

0 comments on commit 168072b

Please sign in to comment.