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

Skip to content

Commit bfc5ab1

Browse files
committed
Document about alternative JS assets installation with npm packages
1 parent 550a7da commit bfc5ab1

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-cropperjs
22

3-
Cropper.js integration for Symfony.
3+
JavaScript assets of the [symfony/ux-cropperjs](https://packagist.org/packages/symfony/ux-cropperjs) 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-cropperjs](https://packagist.org/packages/symfony/ux-cropperjs) 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-cropperjs](https://packagist.org/packages/symfony/ux-cropperjs) 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-cropperjs](https://packagist.org/packages/symfony/ux-cropperjs) 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-cropperjs](https://packagist.org/packages/symfony/ux-cropperjs) PHP package version:
12+
```shell
13+
composer require symfony/ux-cropperjs:2.23.0
14+
npm add @symfony/ux-cropperjs@2.23.0
15+
```
816

917
## Resources
1018

doc/index.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ needed if you're using AssetMapper):
2626
$ npm install --force
2727
$ npm run watch
2828
29+
.. note::
30+
31+
For more complex installation scenarios, you can install the JavaScript assets through the `@symfony/ux-cropperjs npm package`_
32+
2933
Usage
3034
-----
3135

@@ -149,3 +153,4 @@ https://symfony.com/doc/current/contributing/code/bc.html
149153
.. _`the Symfony UX initiative`: https://ux.symfony.com/
150154
.. _`the Cropper.js options`: https://github.com/fengyuanchen/cropperjs/blob/main/README.md#options
151155
.. _StimulusBundle configured in your app: https://symfony.com/bundles/StimulusBundle/current/index.html
156+
.. _`@symfony/ux-cropperjs npm package`: https://www.npmjs.com/package/@symfony/ux-cropperjs

0 commit comments

Comments
 (0)
0