-
-
Notifications
You must be signed in to change notification settings - Fork 364
[TwigComponent] Add documentation for MakerBundle installation #1923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,7 +58,29 @@ Let's get this thing installed! Run: | |
|
||
$ composer require symfony/ux-twig-component | ||
|
||
That's it! We're ready to go! If you're not using Symfony Flex, add a config | ||
You can now use the `MakerBundle`_ to get the skeleton of the Twig component made: | ||
|
||
.. code-block:: terminal | ||
|
||
$ php bin/console make:twig-component | ||
The name of your twig component (ie Notification): | ||
> Notification | ||
|
||
Make this a live component? (yes/no) [no]: | ||
> no | ||
|
||
created: src/Twig/Components/Notification.php | ||
created: templates/components/Notification.html.twig | ||
|
||
|
||
Success! | ||
|
||
This will also setup the config. | ||
|
||
Similarly, to make a `live component`_, enter ``yes`` when prompted whether | ||
to make this a live component. | ||
Comment on lines
+80
to
+81
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we should talk about LiveComponent that early in the page. |
||
|
||
If you're not using Symfony Flex, add a config | ||
file to control the template directory for your components: | ||
|
||
.. _default_config: | ||
|
@@ -72,6 +94,8 @@ file to control the template directory for your components: | |
# Namespace & directory for components | ||
App\Twig\Components\: 'components/' | ||
|
||
That's it! We're ready to go! | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer the way it was before. For most of new users, composer require will be enough. |
||
|
||
Component Basics | ||
---------------- | ||
|
||
|
@@ -1662,6 +1686,7 @@ the Symfony framework: | |
https://symfony.com/doc/current/contributing/code/bc.html | ||
|
||
.. _`Live Components`: https://symfony.com/bundles/ux-live-component/current/index.html | ||
.. _`MakerBundle`: https://symfony.com/bundles/SymfonyMakerBundle/current/index.html | ||
.. _`live component`: https://symfony.com/bundles/ux-live-component/current/index.html | ||
.. _`Vue`: https://v3.vuejs.org/guide/computed.html | ||
.. _`Live Nested Components`: https://symfony.com/bundles/ux-live-component/current/index.html#nested-components | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean here ? How does the maker bundle set the local config ?