Skip to content

Commit 9f597be

Browse files
committed
Document about alternative JS assets installation with npm packages
1 parent a445be9 commit 9f597be

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

README.md

+19
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
[Google Maps](https://developers.google.com/maps/documentation/javascript/overview) integration for Symfony UX Map.
44

5+
## Installation
6+
7+
Install the bridge using Composer and Symfony Flex:
8+
9+
```shell
10+
composer require symfony/ux-google-map
11+
```
12+
13+
If you're using WebpackEncore, install your assets and restart Encore (not
14+
needed if you're using AssetMapper):
15+
16+
```shell
17+
npm install --force
18+
npm run watch
19+
```
20+
21+
> [!NOTE]
22+
> Alternatively, [@symfony/ux-google-map package](https://www.npmjs.com/package/@symfony/ux-google-map) can be used to install the JavaScript assets without requiring PHP.
23+
524
## DSN example
625

726
```dotenv

assets/README.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# @symfony/ux-google-map
22

3-
Easily embed interactive maps in your Symfony application.
3+
JavaScript assets of the [symfony/ux-google-map](https://packagist.org/packages/symfony/ux-google-map) 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-google-map](https://packagist.org/packages/symfony/ux-google-map) 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-google-map](https://packagist.org/packages/symfony/ux-google-map) 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-google-map](https://packagist.org/packages/symfony/ux-google-map) 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-google-map](https://packagist.org/packages/symfony/ux-google-map) PHP package version:
12+
```shell
13+
composer require symfony/ux-google-map:2.23.0
14+
npm add @symfony/[email protected]
15+
```
816

917
## Resources
1018

0 commit comments

Comments
 (0)