Advertisement
Punk_UnDeaD

Untitled

Mar 14th, 2015
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.10 KB | None | 0 0
  1. function d_common_libraries_info() {
  2.   global $conf;
  3.   return [
  4.     'webcomponentsjs' => [
  5.       'name' => 'webcomponents',
  6.       'vendor url' => 'http://polymer-project.org',
  7.       'download url' => 'https://github.com/Polymer/polymer',
  8.       'version arguments' => [
  9.         'file' => 'webcomponents.js',
  10.         'pattern' => '/@version (\d\.\d\.\d)/',
  11.       ],
  12.       'files' => [
  13.         'js' => [
  14.           'webcomponents.min.js' => [
  15.             'type' => 'file',
  16.             'scope' => 'header',
  17.             'group' => JS_LIBRARY,
  18.             'every_page' => TRUE,
  19.             'weight' => -100
  20.           ],
  21.           'polymer_components' => [
  22.             'type' => 'inline',
  23.             'scope' => 'header',
  24.             'group' => JS_LIBRARY,
  25.             'every_page' => TRUE,
  26.             'weight' => 100,
  27.             'data' => <<<SCRIPT
  28. document.write('<link href="/{$conf['components_path']}/{$conf['components_file']}" rel="import" />');
  29. SCRIPT
  30.           ]
  31.         ],
  32.       ],
  33.       'callbacks' => [
  34. //        'post-load' => ['_polymer_load_components']
  35.       ],
  36.     ],
  37.   ];
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement