8000 Document about alternative JS assets installation with npm packages · symfony/ux-swup@bf6cd7a · GitHub
[go: up one dir, main page]

Skip to content

Commit bf6cd7a

Browse files
committed
Document about alternative JS assets installation with npm packages
1 parent 87a61d5 commit bf6cd7a

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

assets/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# @symfony/ux-swup
22

3-
Swup integration for Symfony.
3+
JavaScript assets of the [symfony/ux-swup](https://packagist.org/packages/symfony/ux-swup) PHP package.
44

5-
**ℹ️ Direct installation of this package is for advanced users only.** We strongly recommend installing it through the PHP package [symfony/ux-swup](https://packagist.org/packages/symfony/ux-swup) in a Symfony application with Flex enabled.
5+
## Installation
66

7-
If you still want to install this package directly, **make sure its version exactly matches [symfony/ux-swup](https://packagist.org/packages/symfony/ux-swup) PHP package version.**
7+
This npm package is **reserved for advanced users** who want to decouple their JavaScript dependencies from their PHP dependencies (e.g., when building Docker images, running JavaScript-only pipelines, etc.).
8+
9+
We **strongly recommend not installing this package directly**, but instead install the PHP package [symfony/ux-swup](https://packagist.org/packages/symfony/ux-swup) in your Symfony application with [Flex](https://github.com/symfony/flex) enabled.
10+
11+
If you still want to install this package directly, please make sure its version exactly matches [symfony/ux-swup](https://packagist.org/packages/symfony/ux-swup) PHP package version:
12+
```shell
13+
composer require symfony/ux-swup:2.23.0
14+
npm add @symfony/ux-swup@2.23.0
15+
```
< 8000 /code>
816

917
## Resources
1018

doc/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ needed if you're using AssetMapper):
3030
$ npm install --force
3131
$ npm run watch
3232
33+
.. note::
34+
35+
For more complex installation scenarios, you can install the JavaScript assets through the `@symfony/ux-swup npm package`_
36+
3337
Usage
3438
-----
3539

@@ -202,3 +206,4 @@ https://symfony.com/doc/current/contributing/code/bc.html
202206
.. _`StimulusBundle`: https://symfony.com/bundles/StimulusBundle/current/index.html
203207
.. _`Swup Options`: https://swup.js.org/options
204208
.. _StimulusBundle configured in your app: https://symfony.com/bundles/StimulusBundle/current/index.html
209+
.. _`@symfony/ux-swup npm package`: https://www.npmjs.com/package/@symfony/ux-swup

0 commit comments

Comments
 (0)
0