mirror of
https://github.com/symfony/ux-notify.git
synced 2026-03-24 00:02:14 +01:00
Document about alternative JS assets installation with npm packages
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
# @symfony/ux-notify
|
||||
|
||||
Native notification integration for Symfony using Mercure.
|
||||
JavaScript assets of the [symfony/ux-notify](https://packagist.org/packages/symfony/ux-notify) PHP package.
|
||||
|
||||
**ℹ️ Direct installation of this package is for advanced users only.** We strongly recommend installing it through the PHP package [symfony/ux-notify](https://packagist.org/packages/symfony/ux-notify) in a Symfony application with Flex enabled.
|
||||
## Installation
|
||||
|
||||
If you still want to install this package directly, **make sure its version exactly matches [symfony/ux-notify](https://packagist.org/packages/symfony/ux-notify) PHP package version.**
|
||||
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.).
|
||||
|
||||
We **strongly recommend not installing this package directly**, but instead install the PHP package [symfony/ux-notify](https://packagist.org/packages/symfony/ux-notify) in your Symfony application with [Flex](https://github.com/symfony/flex) enabled.
|
||||
|
||||
If you still want to install this package directly, please make sure its version exactly matches [symfony/ux-notify](https://packagist.org/packages/symfony/ux-notify) PHP package version:
|
||||
```shell
|
||||
composer require symfony/ux-notify:2.23.0
|
||||
npm add @symfony/ux-notify@2.23.0
|
||||
```
|
||||
|
||||
## Resources
|
||||
|
||||
|
||||
@@ -25,6 +25,10 @@ needed if you're using AssetMapper):
|
||||
$ npm install --force
|
||||
$ npm run watch
|
||||
|
||||
.. note::
|
||||
|
||||
For more complex installation scenarios, you can install the JavaScript assets through the `@symfony/ux-notify npm package`_
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
@@ -154,3 +158,4 @@ https://symfony.com/doc/current/contributing/code/bc.html
|
||||
.. _`Mercure`: https://mercure.rocks
|
||||
.. _`running Mercure server`: https://symfony.com/doc/current/mercure.html#running-a-mercure-hub
|
||||
.. _`native notifications`: https://developer.mozilla.org/en-US/docs/Web/API/Notifications_API/Using_the_Notifications_API
|
||||
.. _`@symfony/ux-notify npm package`: https://www.npmjs.com/package/@symfony/ux-notify
|
||||
|
||||
Reference in New Issue
Block a user