Module Description
The module provides a bridge between Drupal and Vue.js framework.
This module does nothing on its own. There is no need to install this module unless another module requires it.
Vue 3 / Petite-Vue Support The 3.x branch is where we'll be supporting Vue 3. We'll also be adding a library definition to include Petite-Vue.
Vue2 Docs HOW TO USE:
1. You can use inside twig templates as usual, example:
{{ attach_library('vuejs/vue') }} 2. You can attach it programmatically:
function MYMODULE_page_attachments(array &$attachments) { $attachments['#attached']['library'][] = 'vuejs/vue'; } 3. You can add it as dependency inside your *.libraries.yml:
dependencies: - vuejs/vue - vuejs/vue_router - vuejs/vue_resource 4. Loading libraries: a) Use the following Drush commands if you want to install the libraries locally:
drush vuejs:download vue drush vuejs:download vue-router drush vuejs:download vue-resource Latest (.dev) version also adds the possibility to use composer based requirement: b) npm-asset:
composer require npm-asset/vue:^2 composer require npm-asset/vue-router composer require npm-asset/vue-resource c) bower-asset:
composer require bower-asset/vue:^2 composer require bower-asset/vue-router composer require bower-asset/vue-resource (See https://www.drupal.org/docs/develop/using-composer/using-composer-to-ins... for details on using Asset Packagist)
d) The module also proved the option to load the libraries from CDNs.
This module does nothing on its own. There is no need to install this module unless another module requires it.
Vue 3 / Petite-Vue Support The 3.x branch is where we'll be supporting Vue 3. We'll also be adding a library definition to include Petite-Vue.
Vue2 Docs HOW TO USE:
1. You can use inside twig templates as usual, example:
{{ attach_library('vuejs/vue') }} 2. You can attach it programmatically:
function MYMODULE_page_attachments(array &$attachments) { $attachments['#attached']['library'][] = 'vuejs/vue'; } 3. You can add it as dependency inside your *.libraries.yml:
dependencies: - vuejs/vue - vuejs/vue_router - vuejs/vue_resource 4. Loading libraries: a) Use the following Drush commands if you want to install the libraries locally:
drush vuejs:download vue drush vuejs:download vue-router drush vuejs:download vue-resource Latest (.dev) version also adds the possibility to use composer based requirement: b) npm-asset:
composer require npm-asset/vue:^2 composer require npm-asset/vue-router composer require npm-asset/vue-resource c) bower-asset:
composer require bower-asset/vue:^2 composer require bower-asset/vue-router composer require bower-asset/vue-resource (See https://www.drupal.org/docs/develop/using-composer/using-composer-to-ins... for details on using Asset Packagist)
d) The module also proved the option to load the libraries from CDNs.
Module Link
Project Usage
156
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to provide a bridge between Drupal and Vue.js framework.
Data Name
vuejs