-
-
Notifications
You must be signed in to change notification settings - Fork 496
Adding UX React, Svelte, Vue recipes #1213
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
Conversation
Thanks for the PR 😍 How to test these changes in your application
Diff between recipe versionsIn order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. symfony/ux-react2.8 vs 2.9diff --git a/symfony/ux-react/2.9/assets/react/controllers/Hello.jsx b/symfony/ux-react/2.9/assets/react/controllers/Hello.jsx
new file mode 100644
index 0000000..54fe368
--- /dev/null
+++ b/symfony/ux-react/2.9/assets/react/controllers/Hello.jsx
@@ -0,0 +1,5 @@
+import React from 'react';
+
+export default function (props) {
+ return <div>Hello {props.fullName}</div>;
+}
diff --git a/symfony/ux-react/2.8/manifest.json b/symfony/ux-react/2.9/manifest.json
index be0ff74..444d845 100644
--- a/symfony/ux-react/2.8/manifest.json
+++ b/symfony/ux-react/2.9/manifest.json
@@ -1,5 +1,40 @@
{
"bundles": {
"Symfony\\UX\\React\\ReactBundle": ["all"]
- }
+ },
+ "copy-from-recipe": {
+ "assets/": "assets/"
+ },
+ "conflict": {
+ "symfony/webpack-encore-bundle": "<2.0",
+ "symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0"
+ },
+ "add-lines": [
+ {
+ "file": "webpack.config.js",
+ "content": "\n .enableReactPreset()",
+ "position": "after_target",
+ "target": ".splitEntryChunks()"
+ },
+ {
+ "file": "assets/app.js",
+ "content": "import { registerReactControllerComponents } from '@symfony/ux-react';",
+ "position": "top",
+ "warn_if_missing": true
+ },
+ {
+ "file": "assets/app.js",
+ "content": "registerReactControllerComponents(require.context('./react/controllers', true, /\\.(j|t)sx?$/));",
+ "position": "bottom",
+ "warn_if_missing": true,
+ "requires": "symfony/webpack-encore-bundle"
+ },
+ {
+ "file": "assets/app.js",
+ "content": "registerReactControllerComponents();",
+ "position": "bottom",
+ "warn_if_missing": true,
+ "requires": "symfony/asset-mapper"
+ }
+ ]
} symfony/ux-svelte2.8 vs 2.9diff --git a/symfony/ux-svelte/2.9/assets/svelte/controllers/Hello.svelte b/symfony/ux-svelte/2.9/assets/svelte/controllers/Hello.svelte
new file mode 100644
index 0000000..3499af4
--- /dev/null
+++ b/symfony/ux-svelte/2.9/assets/svelte/controllers/Hello.svelte
@@ -0,0 +1,5 @@
+<script>
+ export let name = "Svelte";
+</script>
+
+<div>Hello {name}</div>
diff --git a/symfony/ux-svelte/2.8/manifest.json b/symfony/ux-svelte/2.9/manifest.json
index 7c82371..c5e3457 100644
--- a/symfony/ux-svelte/2.8/manifest.json
+++ b/symfony/ux-svelte/2.9/manifest.json
@@ -1,5 +1,40 @@
{
"bundles": {
"Symfony\\UX\\Svelte\\SvelteBundle": ["all"]
- }
+ },
+ "copy-from-recipe": {
+ "assets/": "assets/"
+ },
+ "conflict": {
+ "symfony/webpack-encore-bundle": "<2.0",
+ "symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0"
+ },
+ "add-lines": [
+ {
+ "file": "webpack.config.js",
+ "content": "\n .enableSvelte()",
+ "position": "after_target",
+ "target": ".splitEntryChunks()"
+ },
+ {
+ "file": "assets/app.js",
+ "content": "import { registerSvelteControllerComponents } from '@symfony/ux-svelte';",
+ "position": "top",
+ "warn_if_missing": true
+ },
+ {
+ "file": "assets/app.js",
+ "content": "registerSvelteControllerComponents(require.context('./svelte/controllers', true, /\\.svelte$/));",
+ "position": "bottom",
+ "warn_if_missing": true,
+ "requires": "symfony/webpack-encore-bundle"
+ },
+ {
+ "file": "assets/app.js",
+ "content": "registerSvelteControllerComponents();",
+ "position": "bottom",
+ "warn_if_missing": true,
+ "requires": "symfony/asset-mapper"
+ }
+ ]
} symfony/ux-vue2.8 vs 2.9diff --git a/symfony/ux-vue/2.9/assets/vue/controllers/Hello.vue b/symfony/ux-vue/2.9/assets/vue/controllers/Hello.vue
new file mode 100644
index 0000000..2812aa4
--- /dev/null
+++ b/symfony/ux-vue/2.9/assets/vue/controllers/Hello.vue
@@ -0,0 +1,9 @@
+<template>
+ <div>Hello {{ name }}!</div>
+</template>
+
+<script setup>
+ defineProps({
+ name: String
+ });
+</script>
diff --git a/symfony/ux-vue/2.8/manifest.json b/symfony/ux-vue/2.9/manifest.json
index 9010c6f..2682a62 100644
--- a/symfony/ux-vue/2.8/manifest.json
+++ b/symfony/ux-vue/2.9/manifest.json
@@ -1,5 +1,40 @@
{
"bundles": {
"Symfony\\UX\\Vue\\VueBundle": ["all"]
- }
+ },
+ "copy-from-recipe": {
+ "assets/": "assets/"
+ },
+ "conflict": {
+ "symfony/webpack-encore-bundle": "<2.0",
+ "symfony/flex": "<1.20.0 || >=2.0.0,<2.3.0"
+ },
+ "add-lines": [
+ {
+ "file": "webpack.config.js",
+ "content": "\n .enableVueLoader()",
+ "position": "after_target",
+ "target": ".splitEntryChunks()"
+ },
+ {
+ "file": "assets/app.js",
+ "content": "import { registerVueControllerComponents } from '@symfony/ux-vue';",
+ "position": "top",
+ "warn_if_missing": true
+ },
+ {
+ "file": "assets/app.js",
+ "content": "registerVueControllerComponents(require.context('./vue/controllers', true, /\\.vue$/));",
+ "position": "bottom",
+ "warn_if_missing": true,
+ "requires": "symfony/webpack-encore-bundle"
+ },
+ {
+ "file": "assets/app.js",
+ "content": "registerVueControllerComponents();",
+ "position": "bottom",
+ "warn_if_missing": true,
+ "requires": "symfony/asset-mapper"
+ }
+ ]
} |
This is ready for review! |
Post-merge, I'll simplify the docs for the affected UX packages. |
This PR was squashed before being merged into the 2.x branch. Discussion ---------- Updating documentation for newly merged recipes | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Tickets | None | License | MIT See symfony/recipes#1213 Commits ------- cf6a9bd Updating documentation for newly merged recipes
Some manual things don't need to be manual anymore.