Skip to content
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

Adding recipe for skipthedragon/inertia-bundle:1.0 #1609

Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
inertia:
# |--------------------------------------------------------------------------
# | Root View
# |--------------------------------------------------------------------------
# |
# | This option configures the root view that will be used by Inertia to render
# | your application's pages. By default, Inertia will use the "base" view.
# | learn more here: https://github.com/SkipTheDragon/inertia-bundle/blob/master/docs/configuration.md
root_view: 'base.html.twig'


# |--------------------------------------------------------------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation is off

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it now, thanks! :)

# | Server-side Rendering
# |--------------------------------------------------------------------------
# |
# | These options configures if and how Inertia uses Server Side Rendering
# | to pre-render the initial visits made to your application's pages.
# |
# | You can specify a custom SSR bundle path, or omit it to let Inertia
# | try and automatically detect it for you.
# |
# | Do note that enabling these options will NOT automatically make SSR work,
# | as a separate rendering service needs to be available. To learn more,
# | please visit https://inertiajs.com/server-side-rendering
ssr:
enabled: false
url: 'http://127.0.0.1:13714/render'
24 changes: 24 additions & 0 deletions skipthedragon/inertia-bundle/1.0/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"bundles": {
"Rompetomp\\InertiaBundle\\InertiaBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"add-lines": [
{
"file": "templates/base.html.twig",
"content": " {{ inertiaHead(page) }}",
"position": "after_target",
"target": "{% block javascripts %}",
"warn_if_missing": true
},
{
"file": "templates/base.html.twig",
"content": "\n {{ inertia(page) }}\n ",
"position": "after_target",
"target": "{% block body %}",
"warn_if_missing": true
}
]
}
10 changes: 10 additions & 0 deletions skipthedragon/inertia-bundle/1.0/post-install.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<bg=blue;fg=white> </>
<bg=blue;fg=white> Getting started using </><bg=blue;fg=white;options=bold>skipthedragon/inertia-bundle</><bg=blue;fg=white> </>
<bg=blue;fg=white> </>

<fg=blue;options=bold>Configure</> <fg=blue>your transformations:</>
1. React stack: <comment>symfony console inertia:install react --ssr --bundler=webpack</> for Webpack or <comment>symfony console inertia:install react --ssr --bundler=vite</> for Vite.
2. Vue stack: <comment>symfony console inertia:install vue --ssr --bundler=webpack</> for Webpack or <comment>symfony console inertia:install vue --ssr --bundler=vite</> for Vite.
2. Svelte stack: <comment>symfony console inertia:install svelte --ssr --bundler=webpack</> for Webpack or <comment>symfony console inertia:install svelte --ssr --bundler=vite</> for Vite.
3. Adjust the configuration in <comment>%CONFIG_DIR%/packages/inertia.yaml</> according to your needs.
4. Start coding into <comment>assets/js/pages/</>
Loading