You are here

function superfish_library_info_build in Superfish 8

Implements hook_library_info_build().

File

./superfish.module, line 55
The jQuery Superfish plugin for Drupal menus.

Code

function superfish_library_info_build() {
  $libraries = [];
  if ($superfish_library_path = superfish_library_path()) {
    $superfish_library_path = '/' . $superfish_library_path;
    $libraries = [
      'superfish' => [
        'remote' => 'https://github.com/mehrpadin/Superfish-for-Drupal',
        'version' => '2.0',
        'license' => [
          'name' => 'MIT',
          'gpl-compatible' => FALSE,
        ],
        'js' => [
          'js/superfish.js' => [],
        ],
        'dependencies' => [
          'core/jquery',
          'core/drupal',
          'core/drupalSettings',
          'core/jquery.once',
        ],
      ],
      'init' => [
        'js' => [
          $superfish_library_path . '/superfish.js' => [],
        ],
        'css' => [
          'base' => [
            $superfish_library_path . '/css/superfish.css' => [],
          ],
        ],
      ],
      'superfish_hoverintent' => [
        'js' => [
          $superfish_library_path . '/jquery.hoverIntent.minified.js' => [
            'minified' => TRUE,
          ],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
      'superfish_smallscreen' => [
        'js' => [
          $superfish_library_path . '/sfsmallscreen.js' => [],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
      'superfish_touchscreen' => [
        'js' => [
          $superfish_library_path . '/sftouchscreen.js' => [],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
      'superfish_supersubs' => [
        'js' => [
          $superfish_library_path . '/supersubs.js' => [],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
      'superfish_supposition' => [
        'js' => [
          $superfish_library_path . '/supposition.js' => [],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
      'superfish_style_black' => [
        'css' => [
          'theme' => [
            $superfish_library_path . '/style/black/black.css' => [],
          ],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
      'superfish_style_blue' => [
        'css' => [
          'theme' => [
            $superfish_library_path . '/style/blue/blue.css' => [],
          ],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
      'superfish_style_coffee' => [
        'css' => [
          'theme' => [
            $superfish_library_path . '/style/coffee/coffee.css' => [],
          ],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
      'superfish_style_default' => [
        'css' => [
          'theme' => [
            $superfish_library_path . '/style/default/default.css' => [],
          ],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
      'superfish_style_white' => [
        'css' => [
          'theme' => [
            $superfish_library_path . '/style/white/white.css' => [],
          ],
        ],
        'dependencies' => [
          'superfish/init',
        ],
      ],
    ];
    if ($easing_library_path = superfish_library_path('easing')) {
      $easing_library_path = '/' . $easing_library_path;
      $libraries += [
        'superfish_easing' => [
          'js' => [
            $easing_library_path . '/jquery.easing.js' => [],
          ],
        ],
      ];
    }
  }
  return $libraries;
}