Skip to content
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

update pentatrion/vite-bundle recipe #1525

Merged

Conversation

lhapaipai
Copy link
Contributor

Q A
License MIT
Packagist pentatrion/vite-bundle

Update the manifest.json

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) June 22, 2023 09:11
@github-actions
Copy link

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1525/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1525/index.json
  2. Install the package(s) related to this recipe:

    composer req 'symfony/flex:^1.16'
    composer req 'pentatrion/vite-bundle:^1.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

pentatrion/vite-bundle

0.1 vs 0.2
diff --git a/pentatrion/vite-bundle/0.2/config/routes/dev/pentatrion_vite.yaml b/pentatrion/vite-bundle/0.2/config/routes/dev/pentatrion_vite.yaml
new file mode 100644
index 00000000..736059b5
--- /dev/null
+++ b/pentatrion/vite-bundle/0.2/config/routes/dev/pentatrion_vite.yaml
@@ -0,0 +1,3 @@
+_pentatrion_vite:
+    prefix: /build
+    resource: "@PentatrionViteBundle/Resources/config/routing.yaml"
diff --git a/pentatrion/vite-bundle/0.1/manifest.json b/pentatrion/vite-bundle/0.2/manifest.json
index 44c2b2e1..528186cb 100644
--- a/pentatrion/vite-bundle/0.1/manifest.json
+++ b/pentatrion/vite-bundle/0.2/manifest.json
@@ -7,5 +7,8 @@
         "install/package.json": "package.json",
         "install/vite.config.js": "vite.config.js"
     },
+    "copy-from-recipe": {
+        "config/": "%CONFIG_DIR%/"
+    },
     "gitignore": ["/node_modules/", "/%PUBLIC_DIR%/build/"]
 }
diff --git a/pentatrion/vite-bundle/0.1/post-install.txt b/pentatrion/vite-bundle/0.2/post-install.txt
index d72e267b..62b80c7a 100644
--- a/pentatrion/vite-bundle/0.1/post-install.txt
+++ b/pentatrion/vite-bundle/0.2/post-install.txt
@@ -1,6 +1,6 @@
-                                                                 
-           Getting started using pentatrion/vite-bundle          
-                                                                 
+                                                                  
+           Getting started using pentatrion/vite-bundle           
+                                                                  
 
   Configure your transformations:
     1. Verify and uncomment the configuration in %CONFIG_DIR%/packages/pentatrion_vite.yaml.
0.2 vs 1.0
diff --git a/pentatrion/vite-bundle/0.2/manifest.json b/pentatrion/vite-bundle/1.0/manifest.json
index 528186cb..a73261af 100644
--- a/pentatrion/vite-bundle/0.2/manifest.json
+++ b/pentatrion/vite-bundle/1.0/manifest.json
@@ -10,5 +10,21 @@
     "copy-from-recipe": {
         "config/": "%CONFIG_DIR%/"
     },
-    "gitignore": ["/node_modules/", "/%PUBLIC_DIR%/build/"]
+    "gitignore": ["/node_modules/", "/%PUBLIC_DIR%/build/"],
+    "add-lines": [
+        {
+            "file": "templates/base.html.twig",
+            "content": "            {{ vite_entry_script_tags('app') }}",
+            "position": "after_target",
+            "target": "{% block javascripts %}",
+            "warn_if_missing": true
+        },
+        {
+            "file": "templates/base.html.twig",
+            "content": "            {{ vite_entry_link_tags('app') }}",
+            "position": "after_target",
+            "target": "{% block stylesheets %}",
+            "warn_if_missing": true
+        }
+    ]
 }
diff --git a/pentatrion/vite-bundle/0.2/post-install.txt b/pentatrion/vite-bundle/1.0/post-install.txt
index 62b80c7a..c94b4806 100644
--- a/pentatrion/vite-bundle/0.2/post-install.txt
+++ b/pentatrion/vite-bundle/1.0/post-install.txt
@@ -1,13 +1,11 @@
-                                                                  
-           Getting started using pentatrion/vite-bundle           
-                                                                  
+                                                                
+           Getting started using pentatrion/vite-bundle         
+                                                                
 
   Configure your transformations:
-    1. Verify and uncomment the configuration in %CONFIG_DIR%/packages/pentatrion_vite.yaml.
+    1. Add if necessary a configuration file in %CONFIG_DIR%/packages/pentatrion_vite.yaml.
     2. Verify the Vite configuration in /vite.config.js.
     3. Install npm and run npm i.
-    4. Add JS Twig function {{ vite_entry_script_tags('app.js') }} into your base.html.twig.
-    5. Add CSS Twig function {{ vite_entry_link_tags('app.js') }} into your base.html.twig.
-    6. Start the development server: npm run dev.
-    7. Start coding into assets/app.js
+    4. Start the development server: npm run dev.
+    5. Start coding into assets/app.js
 

@symfony-recipes-bot symfony-recipes-bot merged commit 35a37f4 into symfony:main Jun 24, 2023
@lhapaipai lhapaipai deleted the feature/vite-bundle-update branch May 8, 2024 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants