From 8f56f2cee929025a5597b9e44d81fe90c4e7cd71 Mon Sep 17 00:00:00 2001 From: Tudorache Leonard Valentin <31050299+SkipTheDragon@users.noreply.github.com> Date: Thu, 11 Apr 2024 10:40:16 +0300 Subject: [PATCH] Adding recipe for skipthedragon/inertia-bundle:1.0 (#1609) * Adding recipe for skipthedragon/inertia-bundle:1.0 * removed class from bundles in manifest.json and not existent option from config * remove conflict * fix indentation --- .../1.0/config/packages/inertia.yaml | 27 +++++++++++++++++++ .../inertia-bundle/1.0/manifest.json | 24 +++++++++++++++++ .../inertia-bundle/1.0/post-install.txt | 10 +++++++ 3 files changed, 61 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 00000000..c6f65644 --- /dev/null +++ b/skipthedragon/inertia-bundle/1.0/config/packages/inertia.yaml @@ -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' + + + # |-------------------------------------------------------------------------- + # | 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' diff --git a/skipthedragon/inertia-bundle/1.0/manifest.json b/skipthedragon/inertia-bundle/1.0/manifest.json new file mode 100644 index 00000000..9d3b76e0 --- /dev/null +++ b/skipthedragon/inertia-bundle/1.0/manifest.json @@ -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 + } + ] +} 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 00000000..fa33a8aa --- /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/