Skip to content

Commit ca42f51

Browse files
committed
Tweaks
1 parent 40d1634 commit ca42f51

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

frontend/create_ux_bundle.rst

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Your ``composer.json`` file must have the ``symfony-ux`` keyword:
2222
Assets location
2323
---------------
2424

25-
Your assets must be located in one of the following directories, with a ``package.json`` file so Flex can handle it
26-
during install/update:
25+
Your assets must be located in one of the following directories, with a
26+
``package.json`` file so Flex can handle it during install/update:
2727

2828
* ``/assets`` (recommended)
2929
* ``/Resources/assets``
@@ -32,9 +32,9 @@ during install/update:
3232
package.json file
3333
-----------------
3434

35-
Your ``package.json`` file must contain a ``symfony`` config with controllers defined, and also add required packages
36-
to the ``peerDependencies`` and ``importmap`` (the list of packages in ``importmap`` should be the same as the ones
37-
in ``peerDependencies``):
35+
Your ``package.json`` file must contain a ``symfony`` config with controllers defined,
36+
and also add required packages to the ``peerDependencies`` and ``importmap`` (the list
37+
of packages in ``importmap`` should be the same as the ones in ``peerDependencies``):
3838

3939
.. code-block:: json
4040
@@ -68,8 +68,8 @@ In this case, the file located at ``[assets directory]/dist/controller.js`` will
6868

6969
.. tip::
7070

71-
You can either write raw JS in this ``dist/controller.js`` file, or you can e.g. write your controller with
72-
TypeScript and transpile it to JavaScript.
71+
You can either write raw JS in this ``dist/controller.js`` file, or you can
72+
e.g. write your controller with TypeScript and transpile it to JavaScript.
7373

7474
Here is an example to do so:
7575

@@ -92,7 +92,8 @@ In this case, the file located at ``[assets directory]/dist/controller.js`` will
9292
}
9393
}
9494
95-
2. Add the following to your ``babel.config.js`` file (should be located next to your ``package.json`` file):
95+
2. Add the following to your ``babel.config.js`` file (should be located next
96+
to your ``package.json`` file):
9697

9798
.. code-block:: javascript
9899
@@ -113,7 +114,8 @@ In this case, the file located at ``[assets directory]/dist/controller.js`` will
113114

114115
4. Write your Stimulus controller with TypeScript in ``src/controller.ts``.
115116

116-
5. Run ``npm run build`` or ``yarn run build`` to transpile your TypeScript controller into JavaScript.
117+
5. Run ``npm run build`` or ``yarn run build`` to transpile your TypeScript
118+
controller into JavaScript.
117119

118120
To use your controller in a template (e.g. one defined in your bundle) you can use it like this:
119121

@@ -160,8 +162,9 @@ autoimport List of files to be imported with the controller. Useful e.g
160162
Specifics for Asset Mapper
161163
--------------------------
162164

163-
To make your bundle's assets work with Asset Mapper, you must add the ``importmap`` config like above in your
164-
``package.json`` file, and prepend some configuration to the container::
165+
To make your bundle's assets work with AssetMapper, you must add the ``importmap``
166+
config like above in your ``package.json`` file, and prepend some configuration
167+
to the container::
165168

166169
namespace Acme\FeatureBundle;
167170

0 commit comments

Comments
 (0)