Skip to content

Commit b852a98

Browse files
mahalayxabbuh
authored andcommitted
Reduce ambiguity of encore installation
1 parent d3636de commit b852a98

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

frontend/encore/installation.rst

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,23 @@ Then, install Encore into your project with Yarn:
1111
1212
.. note::
1313

14-
If you want to use `npm`_ instead of `yarn`_, replace ``yarn add xxx --dev`` by
15-
``npm install xxx --save-dev``.
14+
If you want to use `npm`_ instead of `yarn`_:
15+
16+
.. code-block:: terminal
17+
18+
$ npm install @symfony/webpack-encore --save-dev
1619
1720
.. tip::
1821

19-
If you are using Flex for your project, you can install Encore via:
22+
If you are using Flex for your project, you can initialize your project for Encore via:
2023

2124
.. code-block:: terminal
2225
2326
$ composer require encore
2427
28+
This will create a ``webpack.config.js`` file, add the ``assets/`` directory, and add ``node_modules/`` to
29+
``.gitignore``.
30+
2531
This command creates (or modifies) a ``package.json`` file and downloads dependencies
2632
into a ``node_modules/`` directory. When using Yarn, a file called ``yarn.lock``
2733
is also created/updated. When using npm 5, a ``package-lock.json`` file is created/updated.

0 commit comments

Comments
 (0)