From 4e1f844240a625ca4b4e391b6372317696c3cc41 Mon Sep 17 00:00:00 2001 From: Tudorache Leonard Valentin Date: Wed, 10 Apr 2024 20:16:32 +0300 Subject: [PATCH 1/4] Adding recipe for skipthedragon/inertia-bundle:1.0 --- .../1.0/config/packages/inertia.yaml | 28 +++++++++++++++++++ .../inertia-bundle/1.0/manifest.json | 27 ++++++++++++++++++ .../inertia-bundle/1.0/post-install.txt | 10 +++++++ 3 files changed, 65 insertions(+) create mode 100644 skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml create mode 100644 skipthedragon/inertia-bundle/1.0/manifest.json create mode 100644 skipthedragon/inertia-bundle/1.0/post-install.txt diff --git a/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml b/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml new file mode 100644 index 000000000..a208398f2 --- /dev/null +++ b/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml @@ -0,0 +1,28 @@ +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' + + +# |-------------------------------------------------------------------------- + # | 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' + # bundle: '%kernel.project_dir%/public/build-ssr/ssr.js' diff --git a/skipthedragon/inertia-bundle/1.0/manifest.json b/skipthedragon/inertia-bundle/1.0/manifest.json new file mode 100644 index 000000000..11c2d65e4 --- /dev/null +++ b/skipthedragon/inertia-bundle/1.0/manifest.json @@ -0,0 +1,27 @@ +{ + "bundles": { + "Rompetomp\\InertiaBundle\\InertiaBundle::class": ["all"] + }, + "copy-from-recipe": { + "config/": "%CONFIG_DIR%/" + }, + "conflict": { + "symfony/framework-bundle": "<5.4" + }, + "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 + } + ] +} diff --git a/skipthedragon/inertia-bundle/1.0/post-install.txt b/skipthedragon/inertia-bundle/1.0/post-install.txt new file mode 100644 index 000000000..fa33a8aaf --- /dev/null +++ b/skipthedragon/inertia-bundle/1.0/post-install.txt @@ -0,0 +1,10 @@ + + Getting started using skipthedragon/inertia-bundle + + + Configure your transformations: + 1. React stack: symfony console inertia:install react --ssr --bundler=webpack for Webpack or symfony console inertia:install react --ssr --bundler=vite for Vite. + 2. Vue stack: symfony console inertia:install vue --ssr --bundler=webpack for Webpack or symfony console inertia:install vue --ssr --bundler=vite for Vite. + 2. Svelte stack: symfony console inertia:install svelte --ssr --bundler=webpack for Webpack or symfony console inertia:install svelte --ssr --bundler=vite for Vite. + 3. Adjust the configuration in %CONFIG_DIR%/packages/inertia.yaml according to your needs. + 4. Start coding into assets/js/pages/ From fcef6152f0a7243ccec5b0b2cf1cd770c4adef63 Mon Sep 17 00:00:00 2001 From: Tudorache Leonard Valentin Date: Wed, 10 Apr 2024 20:32:26 +0300 Subject: [PATCH 2/4] removed class from bundles in manifest.json and not existent option from config --- skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml | 1 - skipthedragon/inertia-bundle/1.0/manifest.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml b/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml index a208398f2..1e88239fb 100644 --- a/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml +++ b/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml @@ -25,4 +25,3 @@ inertia: ssr: enabled: false url: 'http://127.0.0.1:13714/render' - # bundle: '%kernel.project_dir%/public/build-ssr/ssr.js' diff --git a/skipthedragon/inertia-bundle/1.0/manifest.json b/skipthedragon/inertia-bundle/1.0/manifest.json index 11c2d65e4..bab17975a 100644 --- a/skipthedragon/inertia-bundle/1.0/manifest.json +++ b/skipthedragon/inertia-bundle/1.0/manifest.json @@ -1,6 +1,6 @@ { "bundles": { - "Rompetomp\\InertiaBundle\\InertiaBundle::class": ["all"] + "Rompetomp\\InertiaBundle\\InertiaBundle": ["all"] }, "copy-from-recipe": { "config/": "%CONFIG_DIR%/" From 9ff0207d148d79955f9df1ae10b0c40f0c00a404 Mon Sep 17 00:00:00 2001 From: Tudorache Leonard Valentin Date: Wed, 10 Apr 2024 21:33:48 +0300 Subject: [PATCH 3/4] remove conflict --- skipthedragon/inertia-bundle/1.0/manifest.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/skipthedragon/inertia-bundle/1.0/manifest.json b/skipthedragon/inertia-bundle/1.0/manifest.json index bab17975a..9d3b76e0c 100644 --- a/skipthedragon/inertia-bundle/1.0/manifest.json +++ b/skipthedragon/inertia-bundle/1.0/manifest.json @@ -5,9 +5,6 @@ "copy-from-recipe": { "config/": "%CONFIG_DIR%/" }, - "conflict": { - "symfony/framework-bundle": "<5.4" - }, "add-lines": [ { "file": "templates/base.html.twig", From 64feda18aad9659220ccaff0f57712cd37468cc2 Mon Sep 17 00:00:00 2001 From: Tudorache Leonard Valentin Date: Thu, 11 Apr 2024 10:33:45 +0300 Subject: [PATCH 4/4] fix indentation --- skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml b/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml index 1e88239fb..c6f65644a 100644 --- a/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml +++ b/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml @@ -9,7 +9,7 @@ inertia: root_view: 'base.html.twig' -# |-------------------------------------------------------------------------- + # |-------------------------------------------------------------------------- # | Server-side Rendering # |-------------------------------------------------------------------------- # |