@@ -139,6 +139,9 @@ is the main config file for both Webpack and Webpack Encore:
139
139
140
140
module .exports = Encore .getWebpackConfig ();
141
141
142
+ Creating Other Supporting File
143
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144
+
142
145
Next, open the new ``assets/app.js `` file which contains some JavaScript code
143
146
*and * imports some CSS:
144
147
@@ -185,7 +188,7 @@ a system that you'll learn about soon:
185
188
// register any custom, 3rd party controllers here
186
189
// app.register('some_controller_name', SomeImportedController);
187
190
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
189
192
the Stimulus system:
190
193
191
194
.. code-block :: json
@@ -195,6 +198,18 @@ the Stimulus system:
195
198
"entrypoints" : []
196
199
}
197
200
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
+
198
213
You'll customize and learn more about these files in :doc: `/frontend/encore/simple-example `.
199
214
When you execute Encore, it will ask you to install a few more dependencies based
200
215
on which features of Encore you have enabled.
0 commit comments