Skip to content

Commit 01dc474

Browse files
committed
[Encore] Adding "scripts" to package.json to non-Symfony install instructions
1 parent d4ea2ae commit 01dc474

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

frontend/encore/installation.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ is the main config file for both Webpack and Webpack Encore:
139139
140140
module.exports = Encore.getWebpackConfig();
141141
142+
Creating Other Supporting File
143+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144+
142145
Next, open the new ``assets/app.js`` file which contains some JavaScript code
143146
*and* imports some CSS:
144147

@@ -185,7 +188,7 @@ a system that you'll learn about soon:
185188
// register any custom, 3rd party controllers here
186189
// app.register('some_controller_name', SomeImportedController);
187190
188-
And finally, create an ``assets/controllers.json`` file, which also fits into
191+
Then create an ``assets/controllers.json`` file, which also fits into
189192
the Stimulus system:
190193

191194
.. code-block:: json
@@ -195,6 +198,18 @@ the Stimulus system:
195198
"entrypoints": []
196199
}
197200
201+
Finally, though it's optional, add the following ``scripts`` to your ``package.json``
202+
file so you can run the same commands in the rest of the documentation:
203+
204+
.. code-block:: json
205+
206+
"scripts": {
207+
"dev-server": "encore dev-server",
208+
"dev": "encore dev",
209+
"watch": "encore dev --watch",
210+
"build": "encore production --progress"
211+
}
212+
198213
You'll customize and learn more about these files in :doc:`/frontend/encore/simple-example`.
199214
When you execute Encore, it will ask you to install a few more dependencies based
200215
on which features of Encore you have enabled.

0 commit comments

Comments
 (0)