I have a custom almost empty module where I'm tring to insert a js file using hook_libraries_info(). But when I load the home I don't see my script inserted. It works when I use a simple drupal_add_js.
What I'm doing wrong? I've seen other examples like masonry and nivo-slider and those are similar. Do I need to init somehow? I'm new at module development, so probably is something simple.
DETAILS
Libraries module is enabled:
- Libraries 7.x-2.1
The location of the library folder is this:
- sites/all/libraries/test/test.js
test.module
<?php
//drupal_add_js('sites/all/libraries/test/test.js'); when uncommented it works
/**
* Implements hook_libraries_info().
*/
function test_libraries_info() { // it never works
$libraries['test'] = array(
'name' => 'Test',
'vendor url' => 'http://www.example.com/',
'download url' => 'http://www.example.com/',
'files' => array(
'js' => array(
'test.js',
),
),
);
return $libraries;
}