Skip to content

Commit 5f2f625

Browse files
EliuTimanatobias-93
authored andcommitted
Updated the docs to dump routes into "public" directory in Flex (#310)
* Updated the docs to dump routes into "public" directory in Flex * Fixed missing "format" parameter in routing dump command
1 parent 0f74f4f commit 5f2f625

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Resources/doc/usage.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,21 @@ In applications not using webpack add these two lines in your layout:
2222

2323

2424
If you are using webpack and Encore to package your assets you will need to use the dump command
25-
and export your routes to json:
25+
and export your routes to json, this command will create a json file into the ``web/js`` folder:
2626

2727
.. code-block:: bash
2828
29+
# Symfony 3
2930
bin/console fos:js-routing:dump --format=json
3031
32+
If you are using Flex, probably you want to dump your routes into the ``public`` folder
33+
instead of ``web``, to achieve this you can set the ``target`` parameter:
34+
35+
.. code-block:: bash
36+
37+
# Symfony Flex
38+
bin/console fos:js-routing:dump --format=json --target=public/js/fos_js_routes.json
39+
3140
Then within your JavaScript development you can use:
3241

3342
.. code-block:: javascript

0 commit comments

Comments
 (0)