From 39de963b28a4374504c9cb14c123db4b3e85df89 Mon Sep 17 00:00:00 2001
From: Honore Hounwanou
Date: Mon, 29 May 2023 17:01:14 -0400
Subject: [PATCH 01/37] Add mercuryseries/inertia-bundle recipe
---
.../inertia-bundle/0.1.0/assets/js/app.js | 24 ++++++
.../0.1.0/assets/js/components/Layout.js | 45 +++++++++++
.../0.1.0/assets/js/pages/About.js | 13 ++++
.../0.1.0/assets/js/pages/Home.js | 12 +++
.../inertia-bundle/0.1.0/assets/js/ssr.js | 24 ++++++
.../0.1.0/assets/styles/app.css | 8 ++
.../packages/mercuryseries_inertia_maker.yaml | 38 +++++++++
.../inertia-bundle/0.1.0/jsconfig.json | 9 +++
.../inertia-bundle/0.1.0/manifest.json | 30 ++++++++
.../inertia-bundle/0.1.0/package.json | 31 ++++++++
.../inertia-bundle/0.1.0/post-install.txt | 10 +++
.../0.1.0/src/Controller/PagesController.php | 22 ++++++
.../0.1.0/templates/app.html.twig | 19 +++++
.../inertia-bundle/0.1.0/webpack.config.js | 77 +++++++++++++++++++
.../0.1.0/webpack.ssr.config.js | 43 +++++++++++
15 files changed, 405 insertions(+)
create mode 100644 mercuryseries/inertia-bundle/0.1.0/assets/js/app.js
create mode 100644 mercuryseries/inertia-bundle/0.1.0/assets/js/components/Layout.js
create mode 100644 mercuryseries/inertia-bundle/0.1.0/assets/js/pages/About.js
create mode 100644 mercuryseries/inertia-bundle/0.1.0/assets/js/pages/Home.js
create mode 100644 mercuryseries/inertia-bundle/0.1.0/assets/js/ssr.js
create mode 100644 mercuryseries/inertia-bundle/0.1.0/assets/styles/app.css
create mode 100644 mercuryseries/inertia-bundle/0.1.0/config/packages/mercuryseries_inertia_maker.yaml
create mode 100644 mercuryseries/inertia-bundle/0.1.0/jsconfig.json
create mode 100644 mercuryseries/inertia-bundle/0.1.0/manifest.json
create mode 100644 mercuryseries/inertia-bundle/0.1.0/package.json
create mode 100644 mercuryseries/inertia-bundle/0.1.0/post-install.txt
create mode 100644 mercuryseries/inertia-bundle/0.1.0/src/Controller/PagesController.php
create mode 100644 mercuryseries/inertia-bundle/0.1.0/templates/app.html.twig
create mode 100644 mercuryseries/inertia-bundle/0.1.0/webpack.config.js
create mode 100644 mercuryseries/inertia-bundle/0.1.0/webpack.ssr.config.js
diff --git a/mercuryseries/inertia-bundle/0.1.0/assets/js/app.js b/mercuryseries/inertia-bundle/0.1.0/assets/js/app.js
new file mode 100644
index 000000000..a9de50fc3
--- /dev/null
+++ b/mercuryseries/inertia-bundle/0.1.0/assets/js/app.js
@@ -0,0 +1,24 @@
+import React from "react";
+import { createRoot } from "react-dom/client";
+import { createInertiaApp } from "@inertiajs/react";
+import Layout from "./components/Layout";
+import "../styles/app.css";
+
+const appName = "Symfony ❤️ Inertia.js";
+
+createInertiaApp({
+ progress: {
+ showSpinner: true
+ },
+ title: (title) => (title ? `${title} | ${appName}` : appName),
+ resolve: (name) => {
+ const page = require(`./pages/${name}`).default;
+ if (page.layout === undefined) {
+ page.layout = Layout;
+ }
+ return page;
+ },
+ setup({ el, App, props }) {
+ createRoot(el).render();
+ },
+});
diff --git a/mercuryseries/inertia-bundle/0.1.0/assets/js/components/Layout.js b/mercuryseries/inertia-bundle/0.1.0/assets/js/components/Layout.js
new file mode 100644
index 000000000..7df97ec7e
--- /dev/null
+++ b/mercuryseries/inertia-bundle/0.1.0/assets/js/components/Layout.js
@@ -0,0 +1,45 @@
+import React from "react";
+import { Link, usePage } from "@inertiajs/react";
+import Routing from "fos-router";
+
+const Layout = ({ children }) => {
+ const { component } = usePage();
+
+ return (
+ <>
+
+
+
+
+ {children}
+
+
+ >
+ );
+};
+
+export default (page) => {page};
diff --git a/mercuryseries/inertia-bundle/0.1.0/assets/js/pages/About.js b/mercuryseries/inertia-bundle/0.1.0/assets/js/pages/About.js
new file mode 100644
index 000000000..cdd0ac10a
--- /dev/null
+++ b/mercuryseries/inertia-bundle/0.1.0/assets/js/pages/About.js
@@ -0,0 +1,13 @@
+import React from "react";
+import { Head } from "@inertiajs/react";
+
+export default function AboutPage() {
+ return (
+ <>
+
+
+
About Us
+ Lorem ipsum dolor sit amet, consectetur adipisicing elit.
+ >
+ );
+}
diff --git a/mercuryseries/inertia-bundle/0.1.0/assets/js/pages/Home.js b/mercuryseries/inertia-bundle/0.1.0/assets/js/pages/Home.js
new file mode 100644
index 000000000..424a3b5c9
--- /dev/null
+++ b/mercuryseries/inertia-bundle/0.1.0/assets/js/pages/Home.js
@@ -0,0 +1,12 @@
+import React from "react";
+import { Head } from "@inertiajs/react";
+
+export default function HomePage({ name }) {
+ return (
+ <>
+