From e24e689cf6f643922105f3bd27ead957c08733f3 Mon Sep 17 00:00:00 2001 From: Hugues Tavernier Date: Thu, 22 Aug 2024 20:22:02 +0200 Subject: [PATCH] update the markdown doc and install bash scripts --- README.md | 20 ++++++++++++++------ bin/install-playgrounds.sh | 17 ++++++----------- bin/install.sh | 1 - playground/legacy/composer.json | 1 + playground/legacy/package.json | 2 +- src/vite-bundle/README.md | 11 ++++++----- src/vite-plugin-symfony/README.md | 10 +++++----- 7 files changed, 33 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index dba90921..1bcbe967 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,6 @@ - - # Symfony Vite Development Repository In this repository you can contribute to `pentatrion/vite-bundle` and `vite-plugin-symfony`. You can find playgrounds for development. @@ -26,16 +24,26 @@ In this repository you can contribute to `pentatrion/vite-bundle` and `vite-plug git clone https://github.com/lhapaipai/symfony-vite-dev.git cd symfony-vite-dev - -## Install vite-bundle/vite-plugin-symfony dependencies +# Install vite-bundle/vite-plugin-symfony dependencies make install +# if you want to test the features in a playground +# - "basic" is the principal playground +# - "stimulus-basic" is for the core feature of stimulus +# - "stimulus" is for Symfony UX +# - other playgrounds are for specific use cases -## Install playgrounds (npm i/composer i for each of them) +cd playground/ +symfony composer install + + +# if you want to install all the playgrounds in one time (for each of them) +# - composer install +# - pnpm run build make install-playgrounds ``` -Note: If you want to install without makefile, first install composer dependencies of `.` and `./playground/stimulus` projects because the `./vendor` and `./playground/stimulus/vendor` directories contain npm dependencies needed for `pnpm install` which is recursive. + ## Execution diff --git a/bin/install-playgrounds.sh b/bin/install-playgrounds.sh index 535e344e..632670c6 100755 --- a/bin/install-playgrounds.sh +++ b/bin/install-playgrounds.sh @@ -9,6 +9,12 @@ PLAYGROUNDS_DIR="$PROJECT_DIR/playground" for PLAYGROUND_DIR in $PLAYGROUNDS_DIR/* do PLAYGROUND="$(basename $PLAYGROUND_DIR)" + + if [ $PLAYGROUND == "docker" ] + then + continue + fi + echo "* installing playground $PLAYGROUND" cd "$PLAYGROUND_DIR" @@ -19,18 +25,7 @@ do && echo ' [ok]' || echo ' [failed]' fi - echo ' > pnpm i' - pnpm i 1> /dev/null \ - && echo ' [ok]' || echo ' [failed]' - echo ' > pnpm run build' pnpm run build 1> /dev/null \ && echo ' [ok]' || echo ' [failed]' - - if [ $PLAYGROUND != "vite-only" ] - then - echo ' > symfony composer install' - symfony composer install 1> /dev/null 2>&1 \ - && echo ' [ok]' || echo ' [failed]' - fi done \ No newline at end of file diff --git a/bin/install.sh b/bin/install.sh index d044d3c6..469e0a53 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -13,5 +13,4 @@ cd "$PROJECT_DIR/src/vite-bundle" symfony composer install cd "$PROJECT_DIR/src/vite-plugin-symfony" -pnpm install pnpm run build diff --git a/playground/legacy/composer.json b/playground/legacy/composer.json index 8626838f..8a8dc088 100644 --- a/playground/legacy/composer.json +++ b/playground/legacy/composer.json @@ -15,6 +15,7 @@ "symfony/framework-bundle": "6.*", "symfony/runtime": "6.*", "symfony/twig-bundle": "6.*", + "symfony/web-link": "6.*", "symfony/yaml": "6.*", "twig/extra-bundle": "^2.12|^3.0", "twig/twig": "^2.12|^3.0" diff --git a/playground/legacy/package.json b/playground/legacy/package.json index b55fb63c..fbf36ba7 100644 --- a/playground/legacy/package.json +++ b/playground/legacy/package.json @@ -13,4 +13,4 @@ "volta": { "node": "20.9.0" } -} \ No newline at end of file +} diff --git a/src/vite-bundle/README.md b/src/vite-bundle/README.md index 4cbdb129..7b546920 100644 --- a/src/vite-bundle/README.md +++ b/src/vite-bundle/README.md @@ -13,13 +13,15 @@ # ViteBundle : Symfony integration with Vite -This bundle helps you render all the dynamic `script` and `link` tags needed. -Essentially, it provides two twig functions to load the correct scripts into your templates. +> [!IMPORTANT] +> This repository is a "subtree split": a read-only subset of that main repository [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) which delivers to packagist only the necessary code. -⚠️ This repository is a "subtree split": a read-only subset of that main repository [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) which delivers to packagist only the necessary code. +> [!IMPORTANT] +> If you want to open issues, contribute, make PRs or consult examples you will have to go to the [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) repository. -If you want to open issues, contribute, make PRs or consult examples you will have to go to the [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) repository. +This bundle helps you render all the dynamic `script` and `link` tags needed. +Essentially, it provides two twig functions to load the correct scripts into your templates. ## Installation @@ -57,7 +59,6 @@ Add these twig functions in any template or base layout where you need to includ | Package | Description | | ----------------------------------------------------------------------- | :------------------------ | -| [vite-bundle](https://github.com/lhapaipai/vite-bundle) | Symfony Bundle (read-only)| | [vite-plugin-symfony](https://github.com/lhapaipai/vite-plugin-symfony) | Vite plugin (read-only) | | [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) | Package for contributors | diff --git a/src/vite-plugin-symfony/README.md b/src/vite-plugin-symfony/README.md index 7574b9ab..4a2d5f4b 100644 --- a/src/vite-plugin-symfony/README.md +++ b/src/vite-plugin-symfony/README.md @@ -9,9 +9,13 @@ +# Vite plugin Symfony +> [!IMPORTANT] +> This repository is a "subtree split": a read-only subset of that main repository [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) which delivers to packagist only the necessary code. -# Vite plugin Symfony +> [!IMPORTANT] +> If you want to open issues, contribute, make PRs or consult examples you will have to go to the [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) repository. A Vite plugin to easily integrate Vite into your Symfony application. @@ -20,9 +24,6 @@ A Vite plugin to easily integrate Vite into your Symfony application. This package is intended for use with the Symfony Bundle : [pentatrion/vite-bundle](https://github.com/lhapaipai/vite-bundle). -⚠️ This repository is a "subtree split": a read-only subset of that main repository [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) which delivers to packagist only the necessary code. - -If you want to open issues, contribute, make PRs or consult examples you will have to go to the [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) repository. ## Installation @@ -85,7 +86,6 @@ and your package.json : | Package | Description | | ----------------------------------------------------------------------- | :------------------------ | | [vite-bundle](https://github.com/lhapaipai/vite-bundle) | Symfony Bundle (read-only)| -| [vite-plugin-symfony](https://github.com/lhapaipai/vite-plugin-symfony) | Vite plugin (read-only) | | [symfony-vite-dev](https://github.com/lhapaipai/symfony-vite-dev) | Package for contributors | ## License