You are here

function clipboardjs_libraries_info in Clipboard.js 7

Implements hook_libraries_info().

File

./clipboardjs.module, line 22
Integrates the Clipboard.js library with Drupal.

Code

function clipboardjs_libraries_info() {
  $libraries = array();
  $libraries['clipboard'] = array(
    'name' => 'Clipboard.js',
    'vendor url' => 'https://zenorocha.github.io/clipboard.js',
    'download url' => 'https://github.com/zenorocha/clipboard.js/archive/master.zip',
    'version arguments' => array(
      'file' => 'bower.json',
      'pattern' => '@"version"\\: "([0-9a-zA-Z\\.-]+)"@',
    ),
    'path' => 'dist',
    'files' => array(
      'js' => array(
        'clipboard.min.js' => array(
          'scope' => 'header',
          'group' => JS_LIBRARY,
          'weight' => -1,
        ),
      ),
    ),
    'integration files' => array(
      'clipboardjs' => array(
        'js' => array(
          '/js/clipboard.js',
        ),
      ),
    ),
    'callbacks' => array(
      'pre-load' => array(
        'clipboardjs_libraries_preload_callback',
      ),
    ),
  );
  return $libraries;
}