Skip to content

Commit 69bea45

Browse files
committed
Document about alternative JS assets installation with npm packages
1 parent 5ed286f commit 69bea45

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

assets/README.md

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

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

917
## Resources
1018

doc/index.rst

+5
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ Next, install a package to help Vue:
3535
$ npm install -D vue-loader --force
3636
$ npm run watch
3737
38+
.. note::
39+
40+
For more complex installation scenarios, you can install the JavaScript assets through the `@symfony/ux-vue npm package`_
41+
3842
That's it! Any files inside ``assets/vue/controllers/`` can now be rendered as
3943
Vue components.
4044

@@ -182,3 +186,4 @@ https://symfony.com/doc/current/contributing/code/bc.html
182186
.. _`Vue.js`: https://vuejs.org/
183187
.. _`the Symfony UX initiative`: https://ux.symfony.com/
184188
.. _ `the related section of the documentation`: https://symfony.com/doc/current/frontend/encore/vuejs.html
189+
.. _`@symfony/ux-vue npm package`: https://www.npmjs.com/package/@symfony/ux-vue

0 commit comments

Comments
 (0)