Skip to content
Snippets Groups Projects
Commit e4c4b921 authored by Hayato Goto's avatar Hayato Goto
Browse files

Make the versions configurable.

parent 4409b350
No related branches found
No related tags found
No related merge requests found
......@@ -13,11 +13,17 @@
* Implements hook_libraries_info().
*/
function vuejs_libraries_info() {
$version_vue = variable_get('vuejs_version_vue', 'v2.5.2');
$version_vue_router = variable_get('vuejs_version_vue_router', 'v3.0.1');
$version_vuex = variable_get('vuejs_version_vuex', 'v3.0.0');
$libraries['vue'] = array(
'name' => 'Vue.js',
'vendor url' => 'https://github.com/vuejs',
'download url' => 'https://github.com/vuejs/vue',
'download file url' => 'https://github.com/vuejs/vue/archive/v2.5.2.tar.gz',
'download file url' => format_string('https://github.com/vuejs/vue/archive/!version.tar.gz', array(
'!version' => drupal_encode_path($version_vue),
)),
'path' => 'dist',
'version arguments' => array(
'file' => 'package.json',
......@@ -35,7 +41,9 @@ function vuejs_libraries_info() {
'name' => 'The official router for Vue.js',
'vendor url' => 'https://github.com/vuejs',
'download url' => 'https://github.com/vuejs/vue-router',
'download file url' => 'https://github.com/vuejs/vue-router/archive/v3.0.1.tar.gz',
'download file url' => format_string('https://github.com/vuejs/vue-router/archive/!version.tar.gz', array(
'!version' => drupal_encode_path($version_vue_router),
)),
'path' => 'dist',
'version arguments' => array(
'file' => 'package.json',
......@@ -53,7 +61,9 @@ function vuejs_libraries_info() {
'name' => 'Vuex',
'vendor url' => 'https://github.com/vuejs',
'download url' => 'https://github.com/vuejs/vuex',
'download file url' => 'https://github.com/vuejs/vuex/archive/v3.0.0.tar.gz',
'download file url' => format_string('https://github.com/vuejs/vuex/archive/v3.0.0.tar.gz', array(
'!version' => drupal_encode_path($version_vuex),
)),
'path' => 'dist',
'version arguments' => array(
'file' => 'package.json',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment