Update Composer, update everything
This commit is contained in:
parent
ea3e94409f
commit
dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions
42
vendor/chi-teck/drupal-code-generator/templates/d7/hook/library.twig
vendored
Normal file
42
vendor/chi-teck/drupal-code-generator/templates/d7/hook/library.twig
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Implements hook_library().
|
||||
*/
|
||||
function {{ machine_name }}_library() {
|
||||
// Library One.
|
||||
$libraries['library-1'] = array(
|
||||
'title' => 'Library One',
|
||||
'website' => 'http://example.com/library-1',
|
||||
'version' => '1.2',
|
||||
'js' => array(
|
||||
drupal_get_path('module', 'my_module') . '/library-1.js' => array(),
|
||||
),
|
||||
'css' => array(
|
||||
drupal_get_path('module', 'my_module') . '/library-2.css' => array(
|
||||
'type' => 'file',
|
||||
'media' => 'screen',
|
||||
),
|
||||
),
|
||||
);
|
||||
// Library Two.
|
||||
$libraries['library-2'] = array(
|
||||
'title' => 'Library Two',
|
||||
'website' => 'http://example.com/library-2',
|
||||
'version' => '3.1-beta1',
|
||||
'js' => array(
|
||||
// JavaScript settings may use the 'data' key.
|
||||
array(
|
||||
'type' => 'setting',
|
||||
'data' => array('library2' => TRUE),
|
||||
),
|
||||
),
|
||||
'dependencies' => array(
|
||||
// Require jQuery UI core by System module.
|
||||
array('system', 'ui'),
|
||||
// Require our other library.
|
||||
array('my_module', 'library-1'),
|
||||
// Require another library.
|
||||
array('other_module', 'library-3'),
|
||||
),
|
||||
);
|
||||
return $libraries;
|
||||
}
|
||||
Reference in a new issue