Skip to content

Commit 49b1a5a

Browse files
committed
tweaks
1 parent 03ee521 commit 49b1a5a

File tree

8 files changed

+27
-18
lines changed

8 files changed

+27
-18
lines changed

docs/babel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Need to extend the Babel configuration further? The easiest way is via
1616
Encore
1717
// ...
1818
19-
// modify our default Babel configuration
19+
// modify the default Babel configuration
2020
.configureBabel(function(babelConfig) {
2121
babelConfig.presets.push('es2017');
2222
})

docs/cdn.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ e.g. ``https://my-cool-app.com.global.prod.fastly.net/dashboard.js``.
3636
directly from your web server.
3737

3838
You *do* need to make sure that the ``script`` and ``link`` tags you include on your
39-
pages also uses the CDN. Fortunately, the ``manifest.json`` is automatically
39+
pages also uses the CDN. Fortunately, the ``manifest.json`` paths are
4040
updated to point to the CDN. In Symfony, as long as you've configured
4141
:doc:`Asset Versioning </versioning>`_, you're done! The ``manifest.json``
4242
file includes the full CDN URL:
4343

4444
.. code-block:: js
4545
46-
{# Same code you had before and setting up the CDN #}
46+
{# Your script/link tags don't need to change at all to support the CDN #}
4747
<script src="{{ asset('build/dashboard.js') }}"></script>

docs/css-preprocessors.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CSS Preprocessors: SASS, LESS, etc
1+
CSS Preprocessors: Sass, LESS, etc
22
==================================
33

44
Using Sass
@@ -8,7 +8,7 @@ To use the Sass pre-processor, install the dependencies:
88

99
.. code-block:: terminal
1010
11-
yarn add --dev sass-loader node-sass
11+
$ yarn add --dev sass-loader node-sass
1212
1313
And enable it in ``webpack.config.js``:
1414

@@ -32,7 +32,7 @@ To use the LESS pre-processor, install the dependencies:
3232

3333
.. code-block:: terminal
3434
35-
yarn add --dev less-loader less
35+
$ yarn add --dev less-loader less
3636
3737
And enable it in ``webpack.config.js``:
3838

docs/dev-server.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,7 @@ instead use the `webpack-dev-server`_:
66

77
.. code-block:: terminal
88
9-
./node_modules/.bin/encore dev-server
10-
11-
.. note::
12-
13-
Hot module replacement is not currently supported.
9+
$ ./node_modules/.bin/encore dev-server
1410
1511
This serves the built assets from a new server at ``http://localhost:8080``
1612
(it does not actually write any files to disk). This means your
@@ -19,4 +15,17 @@ This serves the built assets from a new server at ``http://localhost:8080``
1915
If you've activated the :ref:`manifest.json versioning <load-manifest-files>`
2016
you're done: the paths in your templates will automatically point to the dev server.
2117

18+
You can also pass options to the ``dev-server`` command: any options that
19+
are supported by the normal `webpack-dev-server`_. For example:
20+
21+
.. code-block:: terminal
22+
23+
$ ./node_modules/.bin/encore dev-server --https --port 9000
24+
25+
This will start a server at ``https://localhost:9000``.
26+
27+
.. note::
28+
29+
Hot module replacement is not currently supported.
30+
2231
.. _`webpack-dev-server`: https://webpack.js.org/configuration/dev-server/

docs/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ Then, install Encore into your project with yarn:
1515
``npm install xxx --save-dev``.
1616

1717
This command creates (or modifies) a ``package.json`` file and downloads
18-
dependencies into a ``node_modules`` directory. When using Yarn, a file called
18+
dependencies into a ``node_modules/`` directory. When using Yarn, a file called
1919
``yarn.lock`` is also created/updated. When using npm 5, a ``package-lock.json``
2020
file is created/updated.
2121

2222
.. tip::
2323

2424
You should commit ``package.json`` and ``yarn.lock`` (or ``package-lock.json``
25-
if using npm) to version control, but ignore ``node_modules``.
25+
if using npm) to version control, but ignore ``node_modules/``.
2626

2727
Next, create your ``webpack.config.js`` in :doc:`/simple-example`!
2828

docs/postcss.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ First, download ``postcss-loader`` and any plugins you want, like ``autoprefixer
88

99
.. code-block:: terminal
1010
11-
yarn add --dev postcss-loader autoprefixer
11+
$ yarn add --dev postcss-loader autoprefixer
1212
1313
Next, create a ``postcss.config.js`` file at the root of your project:
1414

@@ -33,7 +33,7 @@ Then, Enable the loader in Encore!
3333
+ .enablePostCssLoader()
3434
;
3535
36-
That's it! The ``postcss-loader`` will now be used for all CSS, SASS, etc
36+
That's it! The ``postcss-loader`` will now be used for all CSS, Sass, etc
3737
files.
3838

3939
.. _`PostCSS`: http://postcss.org/

docs/reactjs.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Using React? Make sure you have React installed, along with the
66

77
.. code-block:: terminal
88
9-
yarn add --dev react react-dom babel-preset-react
9+
$ yarn add --dev react react-dom prop-types babel-preset-react
1010
1111
Enable react in your ``webpack.config.js``:
1212

@@ -23,4 +23,4 @@ Enable react in your ``webpack.config.js``:
2323
That's it! Your ``.js`` and ``.jsx`` files will now be transformed through
2424
``babel-preset-react``.
2525

26-
.. _`babel-react-preset`: https://babeljs.io/docs/plugins/preset-react/
26+
.. _`babel-preset-react`: https://babeljs.io/docs/plugins/preset-react/

docs/versioning.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Tired of deploying and having browser's cache the old version of your assets?
77
By calling ``enableVersioning()``, each filename will now include a hash that
88
changes whenever the *contents* of that file change (e.g. ``app.123abc.js``
99
instead of ``app.js``). This allows you to use aggressive caching strategies
10-
(e.g. a far future Expire) because, whenever a file change, its hash will change,
10+
(e.g. a far future ``Expires``) because, whenever a file change, its hash will change,
1111
invalidating any existing cache:
1212

1313
.. code-block:: diff

0 commit comments

Comments
 (0)