8000 [AssetMapper] Document the filtering options of debug:asset-map · symfony/symfony-docs@6b3e462 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b3e462

Browse files
committed
[AssetMapper] Document the filtering options of debug:asset-map
1 parent d810f6c commit 6b3e462

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

frontend/asset_mapper.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,28 @@ This will show you all the mapped paths and the assets inside of each:
137137
The "Logical Path" is the path to use when referencing the asset, like
138138
from a template.
139139

140+
The ``debug:asset-map`` command provides several options to filter results:
141+
142+
.. code-block:: terminal
143+
144+
# provide an asset name or dir to only show results taht amtch it
145+
$ php bin/console debug:asset-map bootstrap.js
146+
$ php bin/console debug:asset-map style/
147+
148+
# provide an extension to only show that file type
149+
$ php bin/console debug:asset-map --ext=css
150+
151+
# you can also only show assets in vendor/ dir or exclude any results from it
152+
$ php bin/console debug:asset-map --vendor
153+
$ php bin/console debug:asset-map --no-vendor
154+
155+
# you can also combine all filters (e.g. find bold web fonts in your own asset dirs)
156+
$ php bin/console debug:asset-map bold --no-vendor --ext=woff2
157+
158+
.. versionadded:: 7.2
159+
160+
The options to filter ``debug:asset-map`` results were introduced in Symfony 7.2.
161+
140162
.. _importmaps-javascript:
141163

142164
Importmaps & Writing JavaScript

0 commit comments

Comments
 (0)
0