@@ -10,7 +10,7 @@ CSS and one JS file, organized into an ``assets/`` directory:
10
10
With Encore, think of your ``app.js `` file like a standalone JavaScript
11
11
application: it will *require * all of the dependencies it needs (e.g. jQuery or React),
12
12
*including * any CSS. Your ``app.js `` file is already doing this with a special
13
- ``require `` function:
13
+ ``require() `` function:
14
14
15
15
.. code-block :: javascript
16
16
@@ -21,7 +21,7 @@ application: it will *require* all of the dependencies it needs (e.g. jQuery or
21
21
22
22
// var $ = require('jquery');
23
23
24
- Encore's job (via Webpack) is simple: to read and follow *all * of the ``require ``
24
+ Encore's job (via Webpack) is simple: to read and follow *all * of the ``require() ``
25
25
statements and create one final ``app.js `` (and ``app.css ``) that contains *everything *
26
26
your app needs. Encore can do a lot more: minify files, pre-process Sass/LESS,
27
27
support React, Vue.js, etc.
@@ -51,7 +51,7 @@ of your project. It already holds the basic config you need:
51
51
// ...
52
52
53
53
They *key * part is ``addEntry() ``: this tells Encore to load the ``assets/js/app.js ``
54
- file and follow *all * of the ``require `` statements. It will then package everything
54
+ file and follow *all * of the ``require() `` statements. It will then package everything
55
55
together and - thanks to the first ``app `` argument - output final ``app.js `` and
56
56
``app.css `` files into the ``public/build `` directory.
57
57
@@ -120,7 +120,7 @@ be executed. All the CSS files that were required will also be displayed.
120
120
121
121
The ``encore_entry_link_tags() `` and ``encore_entry_script_tags() `` functions
122
122
read from an ``entrypoints.json `` file that's generated by Encore to know the exact
123
- filename(s) to render . This file is *especially * useful because you can
123
+ filename(s) to render. This file is *especially * useful because you can
124
124
:doc: `enable versioning</frontend/encore/versioning> ` or
125
125
:doc: `point assets to a CDN</frontend/encore/cdn> ` without making *any * changes to your
126
126
template: the paths in ``entrypoints.json `` will always be the final, correct paths.
@@ -179,11 +179,11 @@ added to the output file (``app.js``). Refresh to see the message!
179
179
The import and export Statements
180
180
--------------------------------
181
181
182
- Instead of using ``require `` and ``module.exports `` like shown above, JavaScript
182
+ Instead of using ``require() `` and ``module.exports `` like shown above, JavaScript
183
183
provides an alternate syntax based on the `ECMAScript 6 modules `_ that includes
184
184
the ability to use dynamic imports.
185
185
186
- To export values using the alternate syntax, use ``exports ``:
186
+ To export values using the alternate syntax, use ``export ``:
187
187
188
188
.. code-block :: diff
189
189
@@ -343,7 +343,7 @@ This will output a new ``some_page.css``.
343
343
Keep Going!
344
344
-----------
345
345
346
- Encore support many more features! For a full list of what you can do, see
346
+ Encore supports many more features! For a full list of what you can do, see
347
347
`Encore's index.js file `_. Or, go back to :ref: `list of Encore articles <encore-toc >`.
348
348
349
349
.. _`Encore's index.js file` : https://github.com/symfony/webpack-encore/blob/master/index.js
0 commit comments