@@ -59,22 +59,29 @@ together and - thanks to the first ``app`` argument - output final ``app.js`` an
5959
6060To build the assets, run:
6161
62- .. code-block :: terminal
62+ .. configuration-block ::
63+
64+ .. code-block :: terminal
65+
66+ # compile assets once
67+ $ yarn encore dev
68+
69+ # or, recompile assets automatically when files change
70+ $ yarn encore dev --watch
71+
72+ # on deploy, create a production build
73+ $ yarn encore production
6374
64- # compile assets once
65- $ yarn encore dev
66- # if you prefer npm, run:
67- $ npm run dev
75+ .. code-block :: terminal
6876
69- # or, recompile assets automatically when files change
70- $ yarn encore dev --watch
71- # if you prefer npm, run:
72- $ npm run watch
77+ # compile assets once
78+ $ npm run dev
7379
74- # on deploy, create a production build
75- $ yarn encore production
76- # if you prefer npm, run:
77- $ npm run build
80+ # or, recompile assets automatically when files change
81+ $ npm run watch
82+
83+ # on deploy, create a production build
84+ $ npm run build
7885
7986 .. note ::
8087
@@ -159,9 +166,15 @@ files. First, create a file that exports a function:
159166
160167 We'll use jQuery to print this message on the page. Install it via:
161168
162- .. code-block :: terminal
169+ .. configuration-block ::
170+
171+ .. code-block :: terminal
172+
173+ $ yarn add jquery --dev
174+
175+ .. code-block :: terminal
163176
164- $ yarn add jquery --dev
177+ $ npm install jquery --save -dev
165178
166179 Great! Use ``require() `` to import ``jquery `` and ``greet.js ``:
167180
@@ -251,9 +264,16 @@ Next, use ``addEntry()`` to tell Webpack to read these two new files when it bui
251264 And because you just changed the ``webpack.config.js `` file, make sure to stop
252265and restart Encore:
253266
254- .. code-block :: terminal
255267
256- $ yarn run encore dev --watch
268+ .. configuration-block ::
269+
270+ .. code-block :: terminal
271+
272+ $ yarn run encore dev --watch
273+
274+ .. code-block :: terminal
275+
276+ $ npm run watch
257277
258278 Webpack will now output a new ``checkout.js `` file and a new ``account.js `` file
259279in your build directory. And, if any of those files require/import CSS, Webpack
@@ -320,10 +340,17 @@ Encore. When you do, you'll see an error!
320340 Encore supports many features. But, instead of forcing all of them on you, when
321341you need a feature, Encore will tell you what you need to install. Run:
322342
323- .. code-block :: terminal
343+ .. configuration-block ::
344+
345+ .. code-block :: terminal
346+
347+ $ yarn add sass-loader@^10.0.0 sass --dev
348+ $ yarn encore dev --watch
349+
350+ .. code-block :: terminal
324351
325- $ yarn add sass-loader@^10.0.0 sass --dev
326- $ yarn encore dev -- watch
352+ $ npm install sass-loader@^10.0.0 sass --save -dev
353+ $ npm run watch
327354
328355 Your app now supports Sass. Encore also supports LESS and Stylus. See
329356:doc: `/frontend/encore/css-preprocessors `.
0 commit comments