2 * Implements hook_library().
4 function {{ machine_name }}_library() {
6 $libraries['library-1'] = array(
7 'title' => 'Library One',
8 'website' => 'http://example.com/library-1',
11 drupal_get_path('module', 'my_module') . '/library-1.js' => array(),
14 drupal_get_path('module', 'my_module') . '/library-2.css' => array(
21 $libraries['library-2'] = array(
22 'title' => 'Library Two',
23 'website' => 'http://example.com/library-2',
24 'version' => '3.1-beta1',
26 // JavaScript settings may use the 'data' key.
29 'data' => array('library2' => TRUE),
32 'dependencies' => array(
33 // Require jQuery UI core by System module.
34 array('system', 'ui'),
35 // Require our other library.
36 array('my_module', 'library-1'),
37 // Require another library.
38 array('other_module', 'library-3'),