Skip to content

Commit

Permalink
update the markdown doc and install bash scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
lhapaipai committed Aug 22, 2024
1 parent bf0cab3 commit e24e689
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 29 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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/<your-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

Expand Down
17 changes: 6 additions & 11 deletions bin/install-playgrounds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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
1 change: 0 additions & 1 deletion bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions playground/legacy/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion playground/legacy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
"volta": {
"node": "20.9.0"
}
}
}
11 changes: 6 additions & 5 deletions src/vite-bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 |

Expand Down
10 changes: 5 additions & 5 deletions src/vite-plugin-symfony/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
</div>


# 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.

Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e24e689

Please sign in to comment.