@@ -18,7 +18,7 @@ some scenarios:
18
18
* If you want to simplify application deployment.
19
19
20
20
In this article, you'll learn how to combine and minimize CSS and JavaScript files
21
- and how to compile Sass files using PHP only libraries with Assetic.
21
+ and how to compile Sass files using PHP- only libraries with Assetic.
22
22
23
23
Installing the Third-Party Compression Libraries
24
24
------------------------------------------------
@@ -39,10 +39,9 @@ dependency because the most recent stable version is not compatible with Assetic
39
39
Organizing your Web Asset Files
40
40
-------------------------------
41
41
42
- This example shows the common scenario of using the Bootstrap framework, the
43
- jQuery library, the FontAwesome icon fonts and some regular CSS and JavaScript
44
- application files (called ``main.css `` and ``main.js ``). The recommended directory
45
- structure for this set-up is the following:
42
+ This example will include a setup using the Bootstrap CSS framework, jQuery, FontAwesome
43
+ and some regular CSS and and JavaScript application files (called ``main.css `` and
44
+ ``main.js ``). The recommended directory structure for this set-up looks like this:
46
45
47
46
.. code-block :: text
48
47
@@ -74,7 +73,7 @@ structure for this set-up is the following:
74
73
Combining and Minimizing CSS Files and Compiling SCSS Files
75
74
-----------------------------------------------------------
76
75
77
- First, configure a new ``scssphp `` Assetic filter as follows :
76
+ First, configure a new ``scssphp `` Assetic filter:
78
77
79
78
.. configuration-block ::
80
79
@@ -114,11 +113,10 @@ First, configure a new ``scssphp`` Assetic filter as follows:
114
113
115
114
The value of the ``formatter `` option is the fully qualified class name of the
116
115
formatter used by the filter to produce the compiled CSS file. Using the
117
- compressed formatter allows to minimize the resulting file, no matter if the
118
- original files are regular CSS files or SCSS files.
116
+ compressed formatter will minimize the the resulting file, regardless of whether
117
+ the original files are regular CSS files or SCSS files.
119
118
120
- Then, update the code of your Twig template to add the ``{% stylesheets %} `` tag
121
- defined by Assetic:
119
+ Next, your Twig template to add the ``{% stylesheets %} `` tag defined by Assetic:
122
120
123
121
.. code-block :: html+jinja
124
122
@@ -178,7 +176,7 @@ First, configure a new ``jsqueeze`` Assetic filter as follows:
178
176
),
179
177
));
180
178
181
- Then , update the code of your Twig template to add the ``{% javascripts %} `` tag
179
+ Next , update the code of your Twig template to add the ``{% javascripts %} `` tag
182
180
defined by Assetic:
183
181
184
182
.. code-block :: html+jinja
@@ -200,6 +198,6 @@ This simple configuration combines all the JavaScript files, minimizes the conte
200
198
and saves the output in the ``web/js/app.js `` file, which is the one that is
201
199
served to your visitors.
202
200
203
- The leading ``? `` character in the ``jsqueeze `` filter name indicates that it must
204
- be applied only when the ``debug `` mode is disabled in the application, which
205
- usually occurs in the production environment.
201
+ The leading ``? `` character in the ``jsqueeze `` filter name tells Assetic to only
202
+ apply the filter when * not * in ``debug `` mode. In practice, this means that you'll
203
+ see unminified files while developing and minimized files in the `` prod `` environment.
0 commit comments