You are here

function patterns_libraries_info in Patterns 7.2

Same name and namespace in other branches
  1. 7 patterns.module \patterns_libraries_info()

Implements hook_libraries_info().

Requires Codemirror >= 3.01 (new path for addons).

File

./patterns.module, line 270

Code

function patterns_libraries_info() {
  $libraries = array();
  $libraries['codemirror'] = array(
    'name' => 'codemirror',
    'vendor url' => 'http://codemirror.net/',
    'download url' => 'https://github.com/marijnh/CodeMirror/',
    //"version":"3.10.01"
    'version arguments' => array(
      'file' => 'package.json',
      'pattern' => '@"version":"([0-9a-zA-Z\\.-]+)"@',
    ),
    'files' => array(
      'js' => array(
        'lib/codemirror.js',
        'addon/search/search.js',
        'addon/search/searchcursor.js',
        'addon/dialog/dialog.js',
        'addon/mode/loadmode.js',
        'mode/yaml/yaml.js',
        'mode/xml/xml.js',
        'mode/php/php.js',
      ),
      'css' => array(
        'lib/codemirror.css',
        'theme/default.css',
        'addon/dialog/dialog.css',
      ),
    ),
  );
  return $libraries;
}