Skip to content

Commit 33f7d41

Browse files
authored
TASK: [DOCS] improve getting started stack docs (#313)
durring the setup of sylius stack we noticed that a few things are missing.
2 parents f059e00 + 42b5d50 commit 33f7d41

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

docs/getting-started.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ To prevent duplicate Ajax calls, disable the auto-initialized Stimulus app and S
6161
6262
#### Disabling Stimulus app & Symfony UX stylesheets from third party package
6363
64-
First, you need to disable the Stimulus App started by the `sylius/bootstrap-admin-ui` package.
64+
First, you need to disable the Stimulus App started by the `sylius/bootstrap-admin-ui` package and add a custom javascript app hook for the asset mapper.
6565
6666
{% tabs %}
6767
{% tab title="YAML" %}
@@ -77,8 +77,11 @@ sylius_twig_hooks:
7777
symfony_ux:
7878
enabled: false
7979
80-
# Disabling Stimulus App
8180
'sylius_admin.base#javascripts':
81+
app:
82+
priority: 200
83+
template: 'base/javascripts/app.html.twig'
84+
# Disabling Stimulus App
8285
symfony_ux:
8386
enabled: false
8487
```
@@ -103,6 +106,11 @@ return static function (ContainerConfigurator $containerConfigurator): void {
103106
],
104107
105108
'sylius_admin.base#javascripts' => [
109+
// New hook
110+
'app' => [
111+
'priority' => 200,
112+
'template' => 'base/javascripts/app.html.twig',
113+
],
106114
// Disabling Stimulus App
107115
'symfony_ux' => [
108116
'enabled' => false,
@@ -116,6 +124,12 @@ return static function (ContainerConfigurator $containerConfigurator): void {
116124
{% endtab %}
117125
{% endtabs %}
118126
127+
{% code title="base/javascripts/app.html.twig" lineNumbers="true" %}
128+
```twig
129+
{{ importmap('app') }}
130+
```
131+
{% endcode %}
132+
119133
#### Starting Stimulus App
120134
121135
```js

0 commit comments

Comments
 (0)