-
-
Notifications
You must be signed in to change notification settings - Fork 649
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mercuryseries/inertia-bundle recipe (#1517)
* Add mercuryseries/inertia-bundle recipe * fix version issue * fix indentation issue * Remove ::class typo * Switch to 0.2 * Fix wrong bundle extension * Fix wrong AbstractController namespace * Switch to 0.4 * Switch to 0.1 * Trigger ci * Fix typo * Update config/routes.yaml to add csrf config * Keep only MercurySeries\Bundle\InertiaBundle\MercurySeriesInertiaBundle registration * fix typo * Move files to package * Update post-install.txt * fix invalid json file * Update post-install.txt * trigger deployment * trigger deployment * trigger deployment * trigger deployment * Update post-install.txt * Update post-install.txt * Support Symfony 5 * Remove requires * Remove warn_if_missing * Add warn_if_missing false * Add config/routes/inertia.yaml * explicit null * better text * better text * better text * comment out domain * move route config logic to bundle * update post-install.txt * renaming to bundler
- Loading branch information
1 parent
4b48699
commit 89b05a0
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
mercuryseries/inertia-bundle/0.1/config/packages/mercuryseries_inertia.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
mercuryseries_inertia: | ||
# |-------------------------------------------------------------------------- | ||
# | 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' | ||
|
||
# |-------------------------------------------------------------------------- | ||
# | CSRF Protection | ||
# |-------------------------------------------------------------------------- | ||
# | CSRF (Cross-Site Request Forgery) protection is a security measure | ||
# | to prevent malicious websites from making requests on behalf of users | ||
# | without their consent. | ||
# | | ||
# | Inertia provides CSRF protection by configuring CSRF tokens and cookies. | ||
# | The CSRF cookie is used to store the CSRF token, and it is sent with each | ||
# | request made to the application. The CSRF token is verified on the server | ||
# | side to ensure the authenticity of the request. | ||
# | | ||
# | To learn more, please visit https://inertiajs.com/csrf-protection | ||
csrf_cookie: | ||
expire: 0 | ||
path: / | ||
# domain: null | ||
secure: true | ||
sameSite: lax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bundles": { | ||
"MercurySeries\\Bundle\\InertiaBundle\\MercurySeriesInertiaBundle": ["all"] | ||
}, | ||
"copy-from-recipe": { | ||
"config/": "%CONFIG_DIR%/" | ||
}, | ||
"gitignore": ["/%PUBLIC_DIR%/build-ssr/"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>mercuryseries/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. | ||
3. Adjust the configuration in <comment>%CONFIG_DIR%/packages/mercuryseries_inertia.yaml</> according to your needs. | ||
4. Start the development server: <comment>npm run dev-server</>. | ||
5. Start coding into <comment>assets/js/pages/</> |