Guest User

Untitled

a guest
Jun 25th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 92.09 KB | None | 0 0
  1. 00:33 etepia:assets:dump
  2. 01 php /mnt/www/etepia/releases/20180624155856/bin/console assetic:dump --no-debug --env=staging
  3. 01 Dumping all staging assets.
  4. 01 Debug mode is off.
  5. 01
  6. 01 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.ttf
  7. 01 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.woff
  8. 01 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.woff2
  9. 01 15:59:27 [file+] s3://etepia-staging/css/default-skin.png
  10. 01 15:59:27 [file+] s3://etepia-staging/css/default-skin.svg
  11. 01 15:59:27 [file+] s3://etepia-staging/css/app.css
  12. 01 15:59:34 [file+] s3://etepia-staging/js/3af1da2.js
  13. 01 15:59:37 ERROR [console] Error thrown while running command "assetic:dump --no-debug --env=staging". Message: "An error occurred while running:
  14. 01 '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_modules/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_uglifyjs2_indqTpGu'
  15. 01
  16. 01 Error Output:
  17. 01 Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54
  18. 01 targetIndex = items.findIndex(el => el.src === targetLink.ge
  19. 01 ^
  20. 01 ERROR: Unexpected token: operator (>)
  21. 01 at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)
  22. 01 at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:291:53)
  23. 01 at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:235:9)
  24. 01 at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:160:5)
  25. 01 at Module._compile (internal/modules/cjs/loader.js:654:30)
  26. 01 at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
  27. 01 at Module.load (internal/modules/cjs/loader.js:566:32)
  28. 01 at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
  29. 01 at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  30. 01 at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
  31. 01
  32. 01
  33. 01 Input:
  34. 01 $(document).ready(function(){
  35. 01 // PhotoSwipe popup HTML
  36. 01 function buildPswdHtml(){
  37. 01 $("body").append([
  38. 01 '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">',
  39. 01 ' <div class="pswp__bg"></div>',
  40. 01 ' <div class="pswp__scroll-wrap">',
  41. 01 ' <div class="pswp__container">',
  42. 01 ' <div class="pswp__item"></div>',
  43. 01 ' <div class="pswp__item"></div>',
  44. 01 ' <div class="pswp__item"></div>',
  45. 01 ' </div>',
  46. 01 ' <div class="pswp__ui pswp__ui--hidden">',
  47. 01 ' <div class="pswp__top-bar">',
  48. 01 ' <div class="pswp__counter"></div>',
  49. 01 ' <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>',
  50. 01 ' <button class="pswp__button pswp__button--share" title="Share"></button>',
  51. 01 ' <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>',
  52. 01 ' <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>',
  53. 01 ' <div class="pswp__preloader">',
  54. 01 ' <div class="pswp__preloader__icn">',
  55. 01 ' <div class="pswp__preloader__cut">',
  56. 01 ' <div class="pswp__preloader__donut"></div>',
  57. 01 ' </div>',
  58. 01 ' </div>',
  59. 01 ' </div>',
  60. 01 ' </div>',
  61. 01 ' <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">',
  62. 01 ' <div class="pswp__share-tooltip"></div> ',
  63. 01 ' </div>',
  64. 01 ' <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>',
  65. 01 ' <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>',
  66. 01 ' <div class="pswp__caption">',
  67. 01 ' <div class="pswp__caption__center"></div>',
  68. 01 ' </div>',
  69. 01 ' </div>',
  70. 01 ' </div>',
  71. 01 '</div>'
  72. 01 ].join(""));
  73. 01 }
  74. 01
  75. 01
  76. 01 // Find PhotoSwipe items
  77. 01 function getGalleryItems($gallery){
  78. 01 var items = [];
  79. 01
  80. 01 $gallery.find("a").each(function(){
  81. 01 var $anchor = $(this),
  82. 01 size = $anchor.attr("data-size").split("x"),
  83. 01 title = $anchor.attr("data-title"),
  84. 01 item = {
  85. 01 el: $anchor.get(0),
  86. 01 src: $anchor.attr("href"),
  87. 01 w: parseInt(size[0]),
  88. 01 h: parseInt(size[1])
  89. 01 };
  90. 01
  91. 01 if( title ) item.title = title;
  92. 01
  93. 01 items.push(item);
  94. 01 });
  95. 01
  96. 01 return items;
  97. 01 }
  98. 01
  99. 01 function openGallery($gallery, index, items, pswpOptions){
  100. 01 var $pswp = $(".pswp"),
  101. 01 owl = $gallery.data("owlCarousel"),
  102. 01 gallery;
  103. 01
  104. 01 // オプション値を設定
  105. 01 var options = $.extend(true, {
  106. 01 index: index,
  107. 01
  108. 01 // Find out coordinates from which initial zoom-in animation will start (or zoom-out animation will end).
  109. 01 getThumbBoundsFn: function(index){
  110. 01 var $thumbnail = $(items[index].el).find("img"),
  111. 01 offset = $thumbnail.offset();
  112. 01 return {
  113. 01 x: offset.left,
  114. 01 y: offset.top,
  115. 01 w: $thumbnail.outerWidth()
  116. 01 };
  117. 01 }
  118. 01 }, pswpOptions);
  119. 01
  120. 01 gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items, options);
  121. 01 gallery.init();
  122. 01
  123. 01 gallery.listen("close", function(){
  124. 01 this.currItem.initialLayout = options.getThumbBoundsFn(this.getCurrentIndex());
  125. 01 });
  126. 01 }
  127. 01
  128. 01
  129. 01 // 初期化
  130. 01 function initializeGallery($elem, owlOptions, pswpOptions){
  131. 01
  132. 01 // If DOM for PhotoSwipe does not exist, render newly
  133. 01 if( $(".pswp").size() === 0 ){
  134. 01 buildPswdHtml();
  135. 01 }
  136. 01
  137. 01 // Scan to correspond to multiple galleries
  138. 01 $elem.each(function(i){
  139. 01 var $gallery = $(this),
  140. 01 uid = i + 1,
  141. 01 items = getGalleryItems($gallery),
  142. 01 options = $.extend(true, {}, pswpOptions);
  143. 01 // Initialization of OwlCarousel
  144. 01 $owl = $gallery.owlCarousel(owlOptions);
  145. 01 console.dir($owl);
  146. 01
  147. 01 // Assign unique ID to each gallery
  148. 01 options.galleryUID = uid;
  149. 01 $gallery.attr("data-pswp-uid", uid);
  150. 01
  151. 01 // Launch PhotoSwipe with each item click
  152. 01 $gallery.find(".owl-item").on("click", function(e) {
  153. 01 if( !$(e.target).is("img") ) return;
  154. 01 var targetLink = e.target.parentElement,
  155. 01 targetIndex = items.findIndex(el => el.src === targetLink.getAttribute('href'));
  156. 01 if (-1 === targetIndex) throw new Error('Underfined index');
  157. 01
  158. 01 openGallery($gallery, targetIndex, items.concat(), options);
  159. 01 return false;
  160. 01 });
  161. 01 });
  162. 01 }
  163. 01
  164. 01 // We perform processing on `.owl-carousel`
  165. 01 var owlOptions = {
  166. 01 loop: true,
  167. 01 margin: 2,
  168. 01 nav: true,
  169. 01 navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
  170. 01 responsive:{
  171. 01 0:{
  172. 01 items:2
  173. 01 },
  174. 01 600:{
  175. 01 items:3
  176. 01 },
  177. 01 1000:{
  178. 01 items:4
  179. 01 }
  180. 01 }
  181. 01 },
  182. 01 tourPreviewHeader = document.getElementById('js-tour-preview'),
  183. 01 pswpOptions = {
  184. 01 bgOpacity: 0.9,
  185. 01 history: false,
  186. 01 shareEl: false,
  187. 01 barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHeight : 0, bottom:'auto'}
  188. 01 };
  189. 01
  190. 01
  191. 01
  192. 01 initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);
  193. 01
  194. 01 });
  195. 01 " ["exception" => Assetic\Exception\FilterException { …},"command" => "assetic:dump --no-debug --env=staging","message" => """ An error occurred while running:\n '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app...
  196. 01
  197. 01 In FilterException.php line 40:
  198. 01
  199. 01 An error occurred while running:
  200. 01 '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_module
  201. 01 s/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_ugli
  202. 01 fyjs2_indqTpGu'
  203. 01
  204. 01 Error Output:
  205. 01 Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54
  206. 01 targetIndex = items.findIndex(el => el.src === targetLi
  207. 01 nk.ge
  208. 01 ^
  209. 01 ERROR: Unexpected token: operator (>)
  210. 01 at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20
  211. 01 180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)
  212. 01 at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-j
  213. 01 s/bin/uglifyjs:291:53)
  214. 01 at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/
  215. 01 bin/uglifyjs:235:9)
  216. 01 at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_mod
  217. 01 ules/uglify-js/bin/uglifyjs:160:5)
  218. 01 at Module._compile (internal/modules/cjs/loader.js:654:30)
  219. 01 at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10
  220. 01 )
  221. 01 at Module.load (internal/modules/cjs/loader.js:566:32)
  222. 01 at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
  223. 01 at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  224. 01 at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
  225. 01
  226. 01
  227. 01 Input:
  228. 01 $(document).ready(function(){
  229. 01 // PhotoSwipe popup HTML
  230. 01 function buildPswdHtml(){
  231. 01 $("body").append([
  232. 01 '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="tru
  233. 01 e">',
  234. 01 ' <div class="pswp__bg"></div>',
  235. 01 ' <div class="pswp__scroll-wrap">',
  236. 01
  237. 01 ' <div class="pswp__container">',
  238. 01 ' <div class="pswp__item"></div>',
  239. 01 ' <div class="pswp__item"></div>',
  240. 01 ' <div class="pswp__item"></div>',
  241. 01
  242. 01 ' </div>',
  243. 01 ' <div class="pswp__ui pswp__ui--hidden">',
  244. 01 ' <div class="pswp__top-bar">',
  245. 01 ' <div class="pswp__counter"></div>',
  246. 01 ' <button class="pswp__button pswp__button--close" tit
  247. 01 le="Close (Esc)"></button>',
  248. 01 ' <button class="pswp__button pswp__button--share" tit
  249. 01 le="Share"></button>',
  250. 01 ' <button class="pswp__button pswp__button--fs" title=
  251. 01
  252. 01 "Toggle fullscreen"></button>',
  253. 01 ' <button class="pswp__button pswp__button--zoom" titl
  254. 01 e="Zoom in/out"></button>',
  255. 01 ' <div class="pswp__preloader">',
  256. 01 ' <div class="pswp__preloader__icn">',
  257. 01 ' <div class="pswp__preloader__cut">',
  258. 01
  259. 01 ' <div class="pswp__preloader__donut"></div>',
  260. 01 ' </div>',
  261. 01 ' </div>',
  262. 01 ' </div>',
  263. 01 ' </div>',
  264. 01
  265. 01 ' <div class="pswp__share-modal pswp__share-modal--hidden
  266. 01 pswp__single-tap">',
  267. 01 ' <div class="pswp__share-tooltip"></div> ',
  268. 01 ' </div>',
  269. 01 ' <button class="pswp__button pswp__button--arrow--left" t
  270. 01
  271. 01 itle="Previous (arrow left)"></button>',
  272. 01 ' <button class="pswp__button pswp__button--arrow--right"
  273. 01 title="Next (arrow right)"></button>',
  274. 01
  275. 01 ' <div class="pswp__caption">',
  276. 01
  277. 01 ' <div class="pswp__caption__center"></div>',
  278. 01 ' </div>',
  279. 01 ' </div>',
  280. 01
  281. 01 ' </div>',
  282. 01 '</div>'
  283. 01 ].join(""));
  284. 01 }
  285. 01
  286. 01
  287. 01 // Find PhotoSwipe items
  288. 01 function getGalleryItems($gallery){
  289. 01 var items = [];
  290. 01
  291. 01 $gallery.find("a").each(function(){
  292. 01 var $anchor = $(this),
  293. 01 size = $anchor.attr("data-size").split("x"),
  294. 01 title = $anchor.attr("data-title"),
  295. 01 item = {
  296. 01 el: $anchor.get(0),
  297. 01 src: $anchor.attr("href"),
  298. 01 w: parseInt(size[0]),
  299. 01 h: parseInt(size[1])
  300. 01 };
  301. 01
  302. 01 if( title ) item.title = title;
  303. 01
  304. 01
  305. 01 items.push(item);
  306. 01
  307. 01 });
  308. 01
  309. 01 return items;
  310. 01 }
  311. 01
  312. 01 function openGallery($gallery, index, items, pswpOptions){
  313. 01 var $pswp = $(".pswp"),
  314. 01 owl = $gallery.data("owlCarousel"),
  315. 01 gallery;
  316. 01
  317. 01 // オプション値を設定
  318. 01
  319. 01 var options = $.extend(true, {
  320. 01
  321. 01 index: index,
  322. 01
  323. 01 // Find out coordinates from which initial zoom-in animation wi
  324. 01 ll start (or zoom-out animation will end).
  325. 01 getThumbBoundsFn: function(index){
  326. 01 var $thumbnail = $(items[index].el).find("img"),
  327. 01 offset = $thumbnail.offset();
  328. 01 return {
  329. 01 x: offset.left,
  330. 01 y: offset.top,
  331. 01 w: $thumbnail.outerWidth()
  332. 01 };
  333. 01
  334. 01 }
  335. 01
  336. 01 }, pswpOptions);
  337. 01
  338. 01 gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items,
  339. 01 options);
  340. 01 gallery.init();
  341. 01
  342. 01 gallery.listen("close", function(){
  343. 01
  344. 01 this.currItem.initialLayout = options.getThumbBoundsFn(this.get
  345. 01
  346. 01 CurrentIndex());
  347. 01 });
  348. 01 }
  349. 01
  350. 01
  351. 01 // 初期化
  352. 01 function initializeGallery($elem, owlOptions, pswpOptions){
  353. 01
  354. 01 // If DOM for PhotoSwipe does not exist, render newly
  355. 01
  356. 01 if( $(".pswp").size() === 0 ){
  357. 01
  358. 01 buildPswdHtml();
  359. 01 }
  360. 01
  361. 01 // Scan to correspond to multiple galleries
  362. 01 $elem.each(function(i){
  363. 01 var $gallery = $(this),
  364. 01 uid = i + 1,
  365. 01 items = getGalleryItems($gallery),
  366. 01 options = $.extend(true, {}, pswpOptions);
  367. 01
  368. 01 // Initialization of OwlCarousel
  369. 01
  370. 01 $owl = $gallery.owlCarousel(owlOptions);
  371. 01 console.dir($owl);
  372. 01
  373. 01 // Assign unique ID to each gallery
  374. 01 options.galleryUID = uid;
  375. 01 $gallery.attr("data-pswp-uid", uid);
  376. 01
  377. 01 // Launch PhotoSwipe with each item click
  378. 01 $gallery.find(".owl-item").on("click", function(e) {
  379. 01 if( !$(e.target).is("img") ) return;
  380. 01 var targetLink = e.target.parentElement,
  381. 01 targetIndex = items.findIndex(el => el.src === targetLi
  382. 01 nk.getAttribute('href'));
  383. 01 if (-1 === targetIndex) throw new Error('Underfined index')
  384. 01 ;
  385. 01
  386. 01 openGallery($gallery, targetIndex, items.concat(), options)
  387. 01 ;
  388. 01 return false;
  389. 01 });
  390. 01 });
  391. 01 }
  392. 01
  393. 01 // We perform processing on `.owl-carousel`
  394. 01 var owlOptions = {
  395. 01 loop: true,
  396. 01 margin: 2,
  397. 01 nav: true,
  398. 01 navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>"
  399. 01 , "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
  400. 01 responsive:{
  401. 01 0:{
  402. 01 items:2
  403. 01 },
  404. 01 600:{
  405. 01 items:3
  406. 01 },
  407. 01 1000:{
  408. 01 items:4
  409. 01 }
  410. 01 }
  411. 01 },
  412. 01 tourPreviewHeader = document.getElementById('js-tour-preview'),
  413. 01 pswpOptions = {
  414. 01 bgOpacity: 0.9,
  415. 01
  416. 01 history: false,
  417. 01
  418. 01 shareEl: false,
  419. 01 barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHei
  420. 01 ght : 0, bottom:'auto'}
  421. 01 };
  422. 01
  423. 01
  424. 01
  425. 01 initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);
  426. 01
  427. 01 });
  428. 01
  429. 01
  430. 01 assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--jms-job-id JMS-JOB-ID] [-…
  431. 01
  432. cap aborted!
  433. SSHKit::Runner::ExecuteError: Exception while executing as ec2-user@54.68.137.36: php exit status: 1
  434. php stdout: Dumping all staging assets.
  435. Debug mode is off.
  436.  
  437. 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.ttf
  438. 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.woff
  439. 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.woff2
  440. 15:59:27 [file+] s3://etepia-staging/css/default-skin.png
  441. 15:59:27 [file+] s3://etepia-staging/css/default-skin.svg
  442. 15:59:27 [file+] s3://etepia-staging/css/app.css
  443. 15:59:34 [file+] s3://etepia-staging/js/3af1da2.js
  444. php stderr: 15:59:37 ERROR [console] Error thrown while running command "assetic:dump --no-debug --env=staging". Message: "An error occurred while running:
  445. '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_modules/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_uglifyjs2_indqTpGu'
  446.  
  447. Error Output:
  448. Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54
  449. targetIndex = items.findIndex(el => el.src === targetLink.ge
  450. ^
  451. ERROR: Unexpected token: operator (>)
  452. at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)
  453. at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:291:53)
  454. at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:235:9)
  455. at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:160:5)
  456. at Module._compile (internal/modules/cjs/loader.js:654:30)
  457. at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
  458. at Module.load (internal/modules/cjs/loader.js:566:32)
  459. at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
  460. at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  461. at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
  462.  
  463.  
  464. Input:
  465. $(document).ready(function(){
  466. // PhotoSwipe popup HTML
  467. function buildPswdHtml(){
  468. $("body").append([
  469. '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">',
  470. ' <div class="pswp__bg"></div>',
  471. ' <div class="pswp__scroll-wrap">',
  472. ' <div class="pswp__container">',
  473. ' <div class="pswp__item"></div>',
  474. ' <div class="pswp__item"></div>',
  475. ' <div class="pswp__item"></div>',
  476. ' </div>',
  477. ' <div class="pswp__ui pswp__ui--hidden">',
  478. ' <div class="pswp__top-bar">',
  479. ' <div class="pswp__counter"></div>',
  480. ' <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>',
  481. ' <button class="pswp__button pswp__button--share" title="Share"></button>',
  482. ' <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>',
  483. ' <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>',
  484. ' <div class="pswp__preloader">',
  485. ' <div class="pswp__preloader__icn">',
  486. ' <div class="pswp__preloader__cut">',
  487. ' <div class="pswp__preloader__donut"></div>',
  488. ' </div>',
  489. ' </div>',
  490. ' </div>',
  491. ' </div>',
  492. ' <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">',
  493. ' <div class="pswp__share-tooltip"></div> ',
  494. ' </div>',
  495. ' <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>',
  496. ' <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>',
  497. ' <div class="pswp__caption">',
  498. ' <div class="pswp__caption__center"></div>',
  499. ' </div>',
  500. ' </div>',
  501. ' </div>',
  502. '</div>'
  503. ].join(""));
  504. }
  505.  
  506.  
  507. // Find PhotoSwipe items
  508. function getGalleryItems($gallery){
  509. var items = [];
  510.  
  511. $gallery.find("a").each(function(){
  512. var $anchor = $(this),
  513. size = $anchor.attr("data-size").split("x"),
  514. title = $anchor.attr("data-title"),
  515. item = {
  516. el: $anchor.get(0),
  517. src: $anchor.attr("href"),
  518. w: parseInt(size[0]),
  519. h: parseInt(size[1])
  520. };
  521.  
  522. if( title ) item.title = title;
  523.  
  524. items.push(item);
  525. });
  526.  
  527. return items;
  528. }
  529.  
  530. function openGallery($gallery, index, items, pswpOptions){
  531. var $pswp = $(".pswp"),
  532. owl = $gallery.data("owlCarousel"),
  533. gallery;
  534.  
  535. // オプション値を設定
  536. var options = $.extend(true, {
  537. index: index,
  538.  
  539. // Find out coordinates from which initial zoom-in animation will start (or zoom-out animation will end).
  540. getThumbBoundsFn: function(index){
  541. var $thumbnail = $(items[index].el).find("img"),
  542. offset = $thumbnail.offset();
  543. return {
  544. x: offset.left,
  545. y: offset.top,
  546. w: $thumbnail.outerWidth()
  547. };
  548. }
  549. }, pswpOptions);
  550.  
  551. gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items, options);
  552. gallery.init();
  553.  
  554. gallery.listen("close", function(){
  555. this.currItem.initialLayout = options.getThumbBoundsFn(this.getCurrentIndex());
  556. });
  557. }
  558.  
  559.  
  560. // 初期化
  561. function initializeGallery($elem, owlOptions, pswpOptions){
  562.  
  563. // If DOM for PhotoSwipe does not exist, render newly
  564. if( $(".pswp").size() === 0 ){
  565. buildPswdHtml();
  566. }
  567.  
  568. // Scan to correspond to multiple galleries
  569. $elem.each(function(i){
  570. var $gallery = $(this),
  571. uid = i + 1,
  572. items = getGalleryItems($gallery),
  573. options = $.extend(true, {}, pswpOptions);
  574. // Initialization of OwlCarousel
  575. $owl = $gallery.owlCarousel(owlOptions);
  576. console.dir($owl);
  577.  
  578. // Assign unique ID to each gallery
  579. options.galleryUID = uid;
  580. $gallery.attr("data-pswp-uid", uid);
  581.  
  582. // Launch PhotoSwipe with each item click
  583. $gallery.find(".owl-item").on("click", function(e) {
  584. if( !$(e.target).is("img") ) return;
  585. var targetLink = e.target.parentElement,
  586. targetIndex = items.findIndex(el => el.src === targetLink.getAttribute('href'));
  587. if (-1 === targetIndex) throw new Error('Underfined index');
  588.  
  589. openGallery($gallery, targetIndex, items.concat(), options);
  590. return false;
  591. });
  592. });
  593. }
  594.  
  595. // We perform processing on `.owl-carousel`
  596. var owlOptions = {
  597. loop: true,
  598. margin: 2,
  599. nav: true,
  600. navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
  601. responsive:{
  602. 0:{
  603. items:2
  604. },
  605. 600:{
  606. items:3
  607. },
  608. 1000:{
  609. items:4
  610. }
  611. }
  612. },
  613. tourPreviewHeader = document.getElementById('js-tour-preview'),
  614. pswpOptions = {
  615. bgOpacity: 0.9,
  616. history: false,
  617. shareEl: false,
  618. barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHeight : 0, bottom:'auto'}
  619. };
  620.  
  621.  
  622.  
  623. initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);
  624.  
  625. });
  626. " ["exception" => Assetic\Exception\FilterException { …},"command" => "assetic:dump --no-debug --env=staging","message" => """ An error occurred while running:\n '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_modules/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_uglifyjs2_indqTpGu'\n \n Error Output:\n Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54\n targetIndex = items.findIndex(el => el.src === targetLink.ge\n ^\n ERROR: Unexpected token: operator (>)\n at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)\n at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:291:53)\n at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:235:9)\n at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:160:5)\n at Module._compile (internal/modules/cjs/loader.js:654:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)\n at Module.load (internal/modules/cjs/loader.js:566:32)\n at tryModuleLoad (internal/modules/cjs/loader.js:506:12)\n at Function.Module._load (internal/modules/cjs/loader.js:498:3)\n at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)\n \n \n Input:\n $(document).ready(function(){\n // PhotoSwipe popup HTML\n function buildPswdHtml(){\n $("body").append([\n '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">',\n ' <div class="pswp__bg"></div>',\n ' <div class="pswp__scroll-wrap">',\n ' <div class="pswp__container">',\n ' <div class="pswp__item"></div>',\n ' <div class="pswp__item"></div>',\n ' <div class="pswp__item"></div>',\n ' </div>',\n ' <div class="pswp__ui pswp__ui--hidden">',\n ' <div class="pswp__top-bar">',\n ' <div class="pswp__counter"></div>',\n ' <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>',\n ' <button class="pswp__button pswp__button--share" title="Share"></button>',\n ' <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>',\n ' <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>',\n ' <div class="pswp__preloader">',\n ' <div class="pswp__preloader__icn">',\n ' <div class="pswp__preloader__cut">',\n ' <div class="pswp__preloader__donut"></div>',\n ' </div>',\n ' </div>',\n ' </div>',\n ' </div>',\n ' <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">',\n ' <div class="pswp__share-tooltip"></div> ',\n ' </div>',\n ' <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>',\n ' <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>',\n ' <div class="pswp__caption">',\n ' <div class="pswp__caption__center"></div>',\n ' </div>',\n ' </div>',\n ' </div>',\n '</div>'\n ].join(""));\n }\n \n \n // Find PhotoSwipe items\n function getGalleryItems($gallery){\n var items = [];\n \n $gallery.find("a").each(function(){\n var $anchor = $(this),\n size = $anchor.attr("data-size").split("x"),\n title = $anchor.attr("data-title"),\n item = {\n el: $anchor.get(0),\n src: $anchor.attr("href"),\n w: parseInt(size[0]),\n h: parseInt(size[1])\n };\n \n if( title ) item.title = title;\n \n items.push(item);\n });\n \n return items;\n }\n \n function openGallery($gallery, index, items, pswpOptions){\n var $pswp = $(".pswp"),\n owl = $gallery.data("owlCarousel"),\n gallery;\n \n // オプション値を設定\n var options = $.extend(true, {\n index: index,\n \n // Find out coordinates from which initial zoom-in animation will start (or zoom-out animation will end).\n getThumbBoundsFn: function(index){\n var $thumbnail = $(items[index].el).find("img"),\n offset = $thumbnail.offset();\n return {\n x: offset.left,\n y: offset.top,\n w: $thumbnail.outerWidth()\n };\n }\n }, pswpOptions);\n \n gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items, options);\n gallery.init();\n \n gallery.listen("close", function(){\n this.currItem.initialLayout = options.getThumbBoundsFn(this.getCurrentIndex());\n });\n }\n \n \n // 初期化\n function initializeGallery($elem, owlOptions, pswpOptions){\n \n // If DOM for PhotoSwipe does not exist, render newly\n if( $(".pswp").size() === 0 ){\n buildPswdHtml();\n }\n \n // Scan to correspond to multiple galleries\n $elem.each(function(i){\n var $gallery = $(this),\n uid = i + 1,\n items = getGalleryItems($gallery),\n options = $.extend(true, {}, pswpOptions);\n // Initialization of OwlCarousel\n $owl = $gallery.owlCarousel(owlOptions);\n console.dir($owl);\n \n // Assign unique ID to each gallery\n options.galleryUID = uid;\n $gallery.attr("data-pswp-uid", uid);\n \n // Launch PhotoSwipe with each item click\n $gallery.find(".owl-item").on("click", function(e) {\n if( !$(e.target).is("img") ) return;\n var targetLink = e.target.parentElement,\n targetIndex = items.findIndex(el => el.src === targetLink.getAttribute('href'));\n if (-1 === targetIndex) throw new Error('Underfined index');\n \n openGallery($gallery, targetIndex, items.concat(), options);\n return false;\n });\n });\n }\n \n // We perform processing on `.owl-carousel`\n var owlOptions = {\n loop: true,\n margin: 2,\n nav: true,\n navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],\n responsive:{\n 0:{\n items:2\n },\n 600:{\n items:3\n },\n 1000:{\n items:4\n }\n }\n },\n tourPreviewHeader = document.getElementById('js-tour-preview'),\n pswpOptions = {\n bgOpacity: 0.9,\n history: false,\n shareEl: false,\n barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHeight : 0, bottom:'auto'}\n };\n \n \n \n initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);\n \n });\n """] []
  627.  
  628. In FilterException.php line 40:
  629.  
  630. An error occurred while running:
  631. '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_module
  632. s/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_ugli
  633. fyjs2_indqTpGu'
  634.  
  635. Error Output:
  636. Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54
  637. targetIndex = items.findIndex(el => el.src === targetLi
  638. nk.ge
  639. ^
  640. ERROR: Unexpected token: operator (>)
  641. at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20
  642. 180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)
  643. at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-j
  644. s/bin/uglifyjs:291:53)
  645. at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/
  646. bin/uglifyjs:235:9)
  647. at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_mod
  648. ules/uglify-js/bin/uglifyjs:160:5)
  649. at Module._compile (internal/modules/cjs/loader.js:654:30)
  650. at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10
  651. )
  652. at Module.load (internal/modules/cjs/loader.js:566:32)
  653. at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
  654. at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  655. at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
  656.  
  657.  
  658. Input:
  659. $(document).ready(function(){
  660. // PhotoSwipe popup HTML
  661. function buildPswdHtml(){
  662. $("body").append([
  663. '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="tru
  664. e">',
  665. ' <div class="pswp__bg"></div>',
  666. ' <div class="pswp__scroll-wrap">',
  667. ' <div class="pswp__container">',
  668. ' <div class="pswp__item"></div>',
  669. ' <div class="pswp__item"></div>',
  670. ' <div class="pswp__item"></div>',
  671. ' </div>',
  672. ' <div class="pswp__ui pswp__ui--hidden">',
  673. ' <div class="pswp__top-bar">',
  674. ' <div class="pswp__counter"></div>',
  675. ' <button class="pswp__button pswp__button--close" tit
  676. le="Close (Esc)"></button>',
  677. ' <button class="pswp__button pswp__button--share" tit
  678. le="Share"></button>',
  679. ' <button class="pswp__button pswp__button--fs" title=
  680. "Toggle fullscreen"></button>',
  681. ' <button class="pswp__button pswp__button--zoom" titl
  682. e="Zoom in/out"></button>',
  683. ' <div class="pswp__preloader">',
  684. ' <div class="pswp__preloader__icn">',
  685. ' <div class="pswp__preloader__cut">',
  686. ' <div class="pswp__preloader__donut"></div>',
  687. ' </div>',
  688. ' </div>',
  689. ' </div>',
  690. ' </div>',
  691. ' <div class="pswp__share-modal pswp__share-modal--hidden
  692. pswp__single-tap">',
  693. ' <div class="pswp__share-tooltip"></div> ',
  694. ' </div>',
  695. ' <button class="pswp__button pswp__button--arrow--left" t
  696. itle="Previous (arrow left)"></button>',
  697. ' <button class="pswp__button pswp__button--arrow--right"
  698. title="Next (arrow right)"></button>',
  699. ' <div class="pswp__caption">',
  700. ' <div class="pswp__caption__center"></div>',
  701. ' </div>',
  702. ' </div>',
  703. ' </div>',
  704. '</div>'
  705. ].join(""));
  706. }
  707.  
  708.  
  709. // Find PhotoSwipe items
  710. function getGalleryItems($gallery){
  711. var items = [];
  712.  
  713. $gallery.find("a").each(function(){
  714. var $anchor = $(this),
  715. size = $anchor.attr("data-size").split("x"),
  716. title = $anchor.attr("data-title"),
  717. item = {
  718. el: $anchor.get(0),
  719. src: $anchor.attr("href"),
  720. w: parseInt(size[0]),
  721. h: parseInt(size[1])
  722. };
  723.  
  724. if( title ) item.title = title;
  725.  
  726. items.push(item);
  727. });
  728.  
  729. return items;
  730. }
  731.  
  732. function openGallery($gallery, index, items, pswpOptions){
  733. var $pswp = $(".pswp"),
  734. owl = $gallery.data("owlCarousel"),
  735. gallery;
  736.  
  737. // オプション値を設定
  738. var options = $.extend(true, {
  739. index: index,
  740.  
  741. // Find out coordinates from which initial zoom-in animation wi
  742. ll start (or zoom-out animation will end).
  743. getThumbBoundsFn: function(index){
  744. var $thumbnail = $(items[index].el).find("img"),
  745. offset = $thumbnail.offset();
  746. return {
  747. x: offset.left,
  748. y: offset.top,
  749. w: $thumbnail.outerWidth()
  750. };
  751. }
  752. }, pswpOptions);
  753.  
  754. gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items,
  755. options);
  756. gallery.init();
  757.  
  758. gallery.listen("close", function(){
  759. this.currItem.initialLayout = options.getThumbBoundsFn(this.get
  760. CurrentIndex());
  761. });
  762. }
  763.  
  764.  
  765. // 初期化
  766. function initializeGallery($elem, owlOptions, pswpOptions){
  767.  
  768. // If DOM for PhotoSwipe does not exist, render newly
  769. if( $(".pswp").size() === 0 ){
  770. buildPswdHtml();
  771. }
  772.  
  773. // Scan to correspond to multiple galleries
  774. $elem.each(function(i){
  775. var $gallery = $(this),
  776. uid = i + 1,
  777. items = getGalleryItems($gallery),
  778. options = $.extend(true, {}, pswpOptions);
  779. // Initialization of OwlCarousel
  780. $owl = $gallery.owlCarousel(owlOptions);
  781. console.dir($owl);
  782.  
  783. // Assign unique ID to each gallery
  784. options.galleryUID = uid;
  785. $gallery.attr("data-pswp-uid", uid);
  786.  
  787. // Launch PhotoSwipe with each item click
  788. $gallery.find(".owl-item").on("click", function(e) {
  789. if( !$(e.target).is("img") ) return;
  790. var targetLink = e.target.parentElement,
  791. targetIndex = items.findIndex(el => el.src === targetLi
  792. nk.getAttribute('href'));
  793. if (-1 === targetIndex) throw new Error('Underfined index')
  794. ;
  795.  
  796. openGallery($gallery, targetIndex, items.concat(), options)
  797. ;
  798. return false;
  799. });
  800. });
  801. }
  802.  
  803. // We perform processing on `.owl-carousel`
  804. var owlOptions = {
  805. loop: true,
  806. margin: 2,
  807. nav: true,
  808. navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>"
  809. , "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
  810. responsive:{
  811. 0:{
  812. items:2
  813. },
  814. 600:{
  815. items:3
  816. },
  817. 1000:{
  818. items:4
  819. }
  820. }
  821. },
  822. tourPreviewHeader = document.getElementById('js-tour-preview'),
  823. pswpOptions = {
  824. bgOpacity: 0.9,
  825. history: false,
  826. shareEl: false,
  827. barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHei
  828. ght : 0, bottom:'auto'}
  829. };
  830.  
  831.  
  832.  
  833. initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);
  834.  
  835. });
  836.  
  837.  
  838. assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--jms-job-id JMS-JOB-ID] [--] <command> [<write_to>]
  839. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute'
  840. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:11:in `block (2 levels) in execute'
  841.  
  842. Caused by:
  843. SSHKit::Command::Failed: php exit status: 1
  844. php stdout: Dumping all staging assets.
  845. Debug mode is off.
  846.  
  847. 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.ttf
  848. 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.woff
  849. 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.woff2
  850. 15:59:27 [file+] s3://etepia-staging/css/default-skin.png
  851. 15:59:27 [file+] s3://etepia-staging/css/default-skin.svg
  852. 15:59:27 [file+] s3://etepia-staging/css/app.css
  853. 15:59:34 [file+] s3://etepia-staging/js/3af1da2.js
  854. php stderr: 15:59:37 ERROR [console] Error thrown while running command "assetic:dump --no-debug --env=staging". Message: "An error occurred while running:
  855. '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_modules/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_uglifyjs2_indqTpGu'
  856.  
  857. Error Output:
  858. Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54
  859. targetIndex = items.findIndex(el => el.src === targetLink.ge
  860. ^
  861. ERROR: Unexpected token: operator (>)
  862. at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)
  863. at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:291:53)
  864. at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:235:9)
  865. at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:160:5)
  866. at Module._compile (internal/modules/cjs/loader.js:654:30)
  867. at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
  868. at Module.load (internal/modules/cjs/loader.js:566:32)
  869. at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
  870. at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  871. at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
  872.  
  873.  
  874. Input:
  875. $(document).ready(function(){
  876. // PhotoSwipe popup HTML
  877. function buildPswdHtml(){
  878. $("body").append([
  879. '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">',
  880. ' <div class="pswp__bg"></div>',
  881. ' <div class="pswp__scroll-wrap">',
  882. ' <div class="pswp__container">',
  883. ' <div class="pswp__item"></div>',
  884. ' <div class="pswp__item"></div>',
  885. ' <div class="pswp__item"></div>',
  886. ' </div>',
  887. ' <div class="pswp__ui pswp__ui--hidden">',
  888. ' <div class="pswp__top-bar">',
  889. ' <div class="pswp__counter"></div>',
  890. ' <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>',
  891. ' <button class="pswp__button pswp__button--share" title="Share"></button>',
  892. ' <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>',
  893. ' <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>',
  894. ' <div class="pswp__preloader">',
  895. ' <div class="pswp__preloader__icn">',
  896. ' <div class="pswp__preloader__cut">',
  897. ' <div class="pswp__preloader__donut"></div>',
  898. ' </div>',
  899. ' </div>',
  900. ' </div>',
  901. ' </div>',
  902. ' <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">',
  903. ' <div class="pswp__share-tooltip"></div> ',
  904. ' </div>',
  905. ' <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>',
  906. ' <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>',
  907. ' <div class="pswp__caption">',
  908. ' <div class="pswp__caption__center"></div>',
  909. ' </div>',
  910. ' </div>',
  911. ' </div>',
  912. '</div>'
  913. ].join(""));
  914. }
  915.  
  916.  
  917. // Find PhotoSwipe items
  918. function getGalleryItems($gallery){
  919. var items = [];
  920.  
  921. $gallery.find("a").each(function(){
  922. var $anchor = $(this),
  923. size = $anchor.attr("data-size").split("x"),
  924. title = $anchor.attr("data-title"),
  925. item = {
  926. el: $anchor.get(0),
  927. src: $anchor.attr("href"),
  928. w: parseInt(size[0]),
  929. h: parseInt(size[1])
  930. };
  931.  
  932. if( title ) item.title = title;
  933.  
  934. items.push(item);
  935. });
  936.  
  937. return items;
  938. }
  939.  
  940. function openGallery($gallery, index, items, pswpOptions){
  941. var $pswp = $(".pswp"),
  942. owl = $gallery.data("owlCarousel"),
  943. gallery;
  944.  
  945. // オプション値を設定
  946. var options = $.extend(true, {
  947. index: index,
  948.  
  949. // Find out coordinates from which initial zoom-in animation will start (or zoom-out animation will end).
  950. getThumbBoundsFn: function(index){
  951. var $thumbnail = $(items[index].el).find("img"),
  952. offset = $thumbnail.offset();
  953. return {
  954. x: offset.left,
  955. y: offset.top,
  956. w: $thumbnail.outerWidth()
  957. };
  958. }
  959. }, pswpOptions);
  960.  
  961. gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items, options);
  962. gallery.init();
  963.  
  964. gallery.listen("close", function(){
  965. this.currItem.initialLayout = options.getThumbBoundsFn(this.getCurrentIndex());
  966. });
  967. }
  968.  
  969.  
  970. // 初期化
  971. function initializeGallery($elem, owlOptions, pswpOptions){
  972.  
  973. // If DOM for PhotoSwipe does not exist, render newly
  974. if( $(".pswp").size() === 0 ){
  975. buildPswdHtml();
  976. }
  977.  
  978. // Scan to correspond to multiple galleries
  979. $elem.each(function(i){
  980. var $gallery = $(this),
  981. uid = i + 1,
  982. items = getGalleryItems($gallery),
  983. options = $.extend(true, {}, pswpOptions);
  984. // Initialization of OwlCarousel
  985. $owl = $gallery.owlCarousel(owlOptions);
  986. console.dir($owl);
  987.  
  988. // Assign unique ID to each gallery
  989. options.galleryUID = uid;
  990. $gallery.attr("data-pswp-uid", uid);
  991.  
  992. // Launch PhotoSwipe with each item click
  993. $gallery.find(".owl-item").on("click", function(e) {
  994. if( !$(e.target).is("img") ) return;
  995. var targetLink = e.target.parentElement,
  996. targetIndex = items.findIndex(el => el.src === targetLink.getAttribute('href'));
  997. if (-1 === targetIndex) throw new Error('Underfined index');
  998.  
  999. openGallery($gallery, targetIndex, items.concat(), options);
  1000. return false;
  1001. });
  1002. });
  1003. }
  1004.  
  1005. // We perform processing on `.owl-carousel`
  1006. var owlOptions = {
  1007. loop: true,
  1008. margin: 2,
  1009. nav: true,
  1010. navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
  1011. responsive:{
  1012. 0:{
  1013. items:2
  1014. },
  1015. 600:{
  1016. items:3
  1017. },
  1018. 1000:{
  1019. items:4
  1020. }
  1021. }
  1022. },
  1023. tourPreviewHeader = document.getElementById('js-tour-preview'),
  1024. pswpOptions = {
  1025. bgOpacity: 0.9,
  1026. history: false,
  1027. shareEl: false,
  1028. barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHeight : 0, bottom:'auto'}
  1029. };
  1030.  
  1031.  
  1032.  
  1033. initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);
  1034.  
  1035. });
  1036. " ["exception" => Assetic\Exception\FilterException { …},"command" => "assetic:dump --no-debug --env=staging","message" => """ An error occurred while running:\n '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_modules/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_uglifyjs2_indqTpGu'\n \n Error Output:\n Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54\n targetIndex = items.findIndex(el => el.src === targetLink.ge\n ^\n ERROR: Unexpected token: operator (>)\n at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)\n at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:291:53)\n at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:235:9)\n at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:160:5)\n at Module._compile (internal/modules/cjs/loader.js:654:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)\n at Module.load (internal/modules/cjs/loader.js:566:32)\n at tryModuleLoad (internal/modules/cjs/loader.js:506:12)\n at Function.Module._load (internal/modules/cjs/loader.js:498:3)\n at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)\n \n \n Input:\n $(document).ready(function(){\n // PhotoSwipe popup HTML\n function buildPswdHtml(){\n $("body").append([\n '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">',\n ' <div class="pswp__bg"></div>',\n ' <div class="pswp__scroll-wrap">',\n ' <div class="pswp__container">',\n ' <div class="pswp__item"></div>',\n ' <div class="pswp__item"></div>',\n ' <div class="pswp__item"></div>',\n ' </div>',\n ' <div class="pswp__ui pswp__ui--hidden">',\n ' <div class="pswp__top-bar">',\n ' <div class="pswp__counter"></div>',\n ' <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>',\n ' <button class="pswp__button pswp__button--share" title="Share"></button>',\n ' <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>',\n ' <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>',\n ' <div class="pswp__preloader">',\n ' <div class="pswp__preloader__icn">',\n ' <div class="pswp__preloader__cut">',\n ' <div class="pswp__preloader__donut"></div>',\n ' </div>',\n ' </div>',\n ' </div>',\n ' </div>',\n ' <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">',\n ' <div class="pswp__share-tooltip"></div> ',\n ' </div>',\n ' <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>',\n ' <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>',\n ' <div class="pswp__caption">',\n ' <div class="pswp__caption__center"></div>',\n ' </div>',\n ' </div>',\n ' </div>',\n '</div>'\n ].join(""));\n }\n \n \n // Find PhotoSwipe items\n function getGalleryItems($gallery){\n var items = [];\n \n $gallery.find("a").each(function(){\n var $anchor = $(this),\n size = $anchor.attr("data-size").split("x"),\n title = $anchor.attr("data-title"),\n item = {\n el: $anchor.get(0),\n src: $anchor.attr("href"),\n w: parseInt(size[0]),\n h: parseInt(size[1])\n };\n \n if( title ) item.title = title;\n \n items.push(item);\n });\n \n return items;\n }\n \n function openGallery($gallery, index, items, pswpOptions){\n var $pswp = $(".pswp"),\n owl = $gallery.data("owlCarousel"),\n gallery;\n \n // オプション値を設定\n var options = $.extend(true, {\n index: index,\n \n // Find out coordinates from which initial zoom-in animation will start (or zoom-out animation will end).\n getThumbBoundsFn: function(index){\n var $thumbnail = $(items[index].el).find("img"),\n offset = $thumbnail.offset();\n return {\n x: offset.left,\n y: offset.top,\n w: $thumbnail.outerWidth()\n };\n }\n }, pswpOptions);\n \n gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items, options);\n gallery.init();\n \n gallery.listen("close", function(){\n this.currItem.initialLayout = options.getThumbBoundsFn(this.getCurrentIndex());\n });\n }\n \n \n // 初期化\n function initializeGallery($elem, owlOptions, pswpOptions){\n \n // If DOM for PhotoSwipe does not exist, render newly\n if( $(".pswp").size() === 0 ){\n buildPswdHtml();\n }\n \n // Scan to correspond to multiple galleries\n $elem.each(function(i){\n var $gallery = $(this),\n uid = i + 1,\n items = getGalleryItems($gallery),\n options = $.extend(true, {}, pswpOptions);\n // Initialization of OwlCarousel\n $owl = $gallery.owlCarousel(owlOptions);\n console.dir($owl);\n \n // Assign unique ID to each gallery\n options.galleryUID = uid;\n $gallery.attr("data-pswp-uid", uid);\n \n // Launch PhotoSwipe with each item click\n $gallery.find(".owl-item").on("click", function(e) {\n if( !$(e.target).is("img") ) return;\n var targetLink = e.target.parentElement,\n targetIndex = items.findIndex(el => el.src === targetLink.getAttribute('href'));\n if (-1 === targetIndex) throw new Error('Underfined index');\n \n openGallery($gallery, targetIndex, items.concat(), options);\n return false;\n });\n });\n }\n \n // We perform processing on `.owl-carousel`\n var owlOptions = {\n loop: true,\n margin: 2,\n nav: true,\n navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],\n responsive:{\n 0:{\n items:2\n },\n 600:{\n items:3\n },\n 1000:{\n items:4\n }\n }\n },\n tourPreviewHeader = document.getElementById('js-tour-preview'),\n pswpOptions = {\n bgOpacity: 0.9,\n history: false,\n shareEl: false,\n barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHeight : 0, bottom:'auto'}\n };\n \n \n \n initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);\n \n });\n """] []
  1037.  
  1038. In FilterException.php line 40:
  1039.  
  1040. An error occurred while running:
  1041. '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_module
  1042. s/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_ugli
  1043. fyjs2_indqTpGu'
  1044.  
  1045. Error Output:
  1046. Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54
  1047. targetIndex = items.findIndex(el => el.src === targetLi
  1048. nk.ge
  1049. ^
  1050. ERROR: Unexpected token: operator (>)
  1051. at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20
  1052. 180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)
  1053. at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-j
  1054. s/bin/uglifyjs:291:53)
  1055. at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/
  1056. bin/uglifyjs:235:9)
  1057. at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_mod
  1058. ules/uglify-js/bin/uglifyjs:160:5)
  1059. at Module._compile (internal/modules/cjs/loader.js:654:30)
  1060. at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10
  1061. )
  1062. at Module.load (internal/modules/cjs/loader.js:566:32)
  1063. at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
  1064. at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  1065. at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
  1066.  
  1067.  
  1068. Input:
  1069. $(document).ready(function(){
  1070. // PhotoSwipe popup HTML
  1071. function buildPswdHtml(){
  1072. $("body").append([
  1073. '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="tru
  1074. e">',
  1075. ' <div class="pswp__bg"></div>',
  1076. ' <div class="pswp__scroll-wrap">',
  1077. ' <div class="pswp__container">',
  1078. ' <div class="pswp__item"></div>',
  1079. ' <div class="pswp__item"></div>',
  1080. ' <div class="pswp__item"></div>',
  1081. ' </div>',
  1082. ' <div class="pswp__ui pswp__ui--hidden">',
  1083. ' <div class="pswp__top-bar">',
  1084. ' <div class="pswp__counter"></div>',
  1085. ' <button class="pswp__button pswp__button--close" tit
  1086. le="Close (Esc)"></button>',
  1087. ' <button class="pswp__button pswp__button--share" tit
  1088. le="Share"></button>',
  1089. ' <button class="pswp__button pswp__button--fs" title=
  1090. "Toggle fullscreen"></button>',
  1091. ' <button class="pswp__button pswp__button--zoom" titl
  1092. e="Zoom in/out"></button>',
  1093. ' <div class="pswp__preloader">',
  1094. ' <div class="pswp__preloader__icn">',
  1095. ' <div class="pswp__preloader__cut">',
  1096. ' <div class="pswp__preloader__donut"></div>',
  1097. ' </div>',
  1098. ' </div>',
  1099. ' </div>',
  1100. ' </div>',
  1101. ' <div class="pswp__share-modal pswp__share-modal--hidden
  1102. pswp__single-tap">',
  1103. ' <div class="pswp__share-tooltip"></div> ',
  1104. ' </div>',
  1105. ' <button class="pswp__button pswp__button--arrow--left" t
  1106. itle="Previous (arrow left)"></button>',
  1107. ' <button class="pswp__button pswp__button--arrow--right"
  1108. title="Next (arrow right)"></button>',
  1109. ' <div class="pswp__caption">',
  1110. ' <div class="pswp__caption__center"></div>',
  1111. ' </div>',
  1112. ' </div>',
  1113. ' </div>',
  1114. '</div>'
  1115. ].join(""));
  1116. }
  1117.  
  1118.  
  1119. // Find PhotoSwipe items
  1120. function getGalleryItems($gallery){
  1121. var items = [];
  1122.  
  1123. $gallery.find("a").each(function(){
  1124. var $anchor = $(this),
  1125. size = $anchor.attr("data-size").split("x"),
  1126. title = $anchor.attr("data-title"),
  1127. item = {
  1128. el: $anchor.get(0),
  1129. src: $anchor.attr("href"),
  1130. w: parseInt(size[0]),
  1131. h: parseInt(size[1])
  1132. };
  1133.  
  1134. if( title ) item.title = title;
  1135.  
  1136. items.push(item);
  1137. });
  1138.  
  1139. return items;
  1140. }
  1141.  
  1142. function openGallery($gallery, index, items, pswpOptions){
  1143. var $pswp = $(".pswp"),
  1144. owl = $gallery.data("owlCarousel"),
  1145. gallery;
  1146.  
  1147. // オプション値を設定
  1148. var options = $.extend(true, {
  1149. index: index,
  1150.  
  1151. // Find out coordinates from which initial zoom-in animation wi
  1152. ll start (or zoom-out animation will end).
  1153. getThumbBoundsFn: function(index){
  1154. var $thumbnail = $(items[index].el).find("img"),
  1155. offset = $thumbnail.offset();
  1156. return {
  1157. x: offset.left,
  1158. y: offset.top,
  1159. w: $thumbnail.outerWidth()
  1160. };
  1161. }
  1162. }, pswpOptions);
  1163.  
  1164. gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items,
  1165. options);
  1166. gallery.init();
  1167.  
  1168. gallery.listen("close", function(){
  1169. this.currItem.initialLayout = options.getThumbBoundsFn(this.get
  1170. CurrentIndex());
  1171. });
  1172. }
  1173.  
  1174.  
  1175. // 初期化
  1176. function initializeGallery($elem, owlOptions, pswpOptions){
  1177.  
  1178. // If DOM for PhotoSwipe does not exist, render newly
  1179. if( $(".pswp").size() === 0 ){
  1180. buildPswdHtml();
  1181. }
  1182.  
  1183. // Scan to correspond to multiple galleries
  1184. $elem.each(function(i){
  1185. var $gallery = $(this),
  1186. uid = i + 1,
  1187. items = getGalleryItems($gallery),
  1188. options = $.extend(true, {}, pswpOptions);
  1189. // Initialization of OwlCarousel
  1190. $owl = $gallery.owlCarousel(owlOptions);
  1191. console.dir($owl);
  1192.  
  1193. // Assign unique ID to each gallery
  1194. options.galleryUID = uid;
  1195. $gallery.attr("data-pswp-uid", uid);
  1196.  
  1197. // Launch PhotoSwipe with each item click
  1198. $gallery.find(".owl-item").on("click", function(e) {
  1199. if( !$(e.target).is("img") ) return;
  1200. var targetLink = e.target.parentElement,
  1201. targetIndex = items.findIndex(el => el.src === targetLi
  1202. nk.getAttribute('href'));
  1203. if (-1 === targetIndex) throw new Error('Underfined index')
  1204. ;
  1205.  
  1206. openGallery($gallery, targetIndex, items.concat(), options)
  1207. ;
  1208. return false;
  1209. });
  1210. });
  1211. }
  1212.  
  1213. // We perform processing on `.owl-carousel`
  1214. var owlOptions = {
  1215. loop: true,
  1216. margin: 2,
  1217. nav: true,
  1218. navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>"
  1219. , "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
  1220. responsive:{
  1221. 0:{
  1222. items:2
  1223. },
  1224. 600:{
  1225. items:3
  1226. },
  1227. 1000:{
  1228. items:4
  1229. }
  1230. }
  1231. },
  1232. tourPreviewHeader = document.getElementById('js-tour-preview'),
  1233. pswpOptions = {
  1234. bgOpacity: 0.9,
  1235. history: false,
  1236. shareEl: false,
  1237. barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHei
  1238. ght : 0, bottom:'auto'}
  1239. };
  1240.  
  1241.  
  1242.  
  1243. initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);
  1244.  
  1245. });
  1246.  
  1247.  
  1248. assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--jms-job-id JMS-JOB-ID] [--] <command> [<write_to>]
  1249. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/command.rb:99:in `exit_status='
  1250. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/backends/netssh.rb:169:in `execute_command'
  1251. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/backends/abstract.rb:141:in `block in create_command_and_execute'
  1252. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/backends/abstract.rb:141:in `tap'
  1253. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/backends/abstract.rb:141:in `create_command_and_execute'
  1254. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/backends/abstract.rb:74:in `execute'
  1255. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/capistrano-symfony-1.0.0.rc2/lib/capistrano/dsl/symfony.rb:52:in `symfony_console'
  1256. config/deploy.rb:58:in `block (4 levels) in <top (required)>'
  1257. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/backends/abstract.rb:29:in `instance_exec'
  1258. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/backends/abstract.rb:29:in `run'
  1259. /Users/wizardz/.rvm/gems/ruby-2.3.1@etepia/gems/sshkit-1.16.0/lib/sshkit/runners/parallel.rb:12:in `block (2 levels) in execute'
  1260. Tasks: TOP => etepia:assets:dump
  1261. The deploy has failed with an error: Exception while executing as ec2-user@54.68.137.36: php exit status: 1
  1262. php stdout: Dumping all staging assets.
  1263. Debug mode is off.
  1264.  
  1265. 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.ttf
  1266. 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.woff
  1267. 15:59:27 [file+] s3://etepia-staging/fonts/fontawesome-webfont.woff2
  1268. 15:59:27 [file+] s3://etepia-staging/css/default-skin.png
  1269. 15:59:27 [file+] s3://etepia-staging/css/default-skin.svg
  1270. 15:59:27 [file+] s3://etepia-staging/css/app.css
  1271. 15:59:34 [file+] s3://etepia-staging/js/3af1da2.js
  1272. php stderr: 15:59:37 ERROR [console] Error thrown while running command "assetic:dump --no-debug --env=staging". Message: "An error occurred while running:
  1273. '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_modules/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_uglifyjs2_indqTpGu'
  1274.  
  1275. Error Output:
  1276. Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54
  1277. targetIndex = items.findIndex(el => el.src === targetLink.ge
  1278. ^
  1279. ERROR: Unexpected token: operator (>)
  1280. at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)
  1281. at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:291:53)
  1282. at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:235:9)
  1283. at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:160:5)
  1284. at Module._compile (internal/modules/cjs/loader.js:654:30)
  1285. at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
  1286. at Module.load (internal/modules/cjs/loader.js:566:32)
  1287. at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
  1288. at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  1289. at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
  1290.  
  1291.  
  1292. Input:
  1293. $(document).ready(function(){
  1294. // PhotoSwipe popup HTML
  1295. function buildPswdHtml(){
  1296. $("body").append([
  1297. '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">',
  1298. ' <div class="pswp__bg"></div>',
  1299. ' <div class="pswp__scroll-wrap">',
  1300. ' <div class="pswp__container">',
  1301. ' <div class="pswp__item"></div>',
  1302. ' <div class="pswp__item"></div>',
  1303. ' <div class="pswp__item"></div>',
  1304. ' </div>',
  1305. ' <div class="pswp__ui pswp__ui--hidden">',
  1306. ' <div class="pswp__top-bar">',
  1307. ' <div class="pswp__counter"></div>',
  1308. ' <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>',
  1309. ' <button class="pswp__button pswp__button--share" title="Share"></button>',
  1310. ' <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>',
  1311. ' <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>',
  1312. ' <div class="pswp__preloader">',
  1313. ' <div class="pswp__preloader__icn">',
  1314. ' <div class="pswp__preloader__cut">',
  1315. ' <div class="pswp__preloader__donut"></div>',
  1316. ' </div>',
  1317. ' </div>',
  1318. ' </div>',
  1319. ' </div>',
  1320. ' <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">',
  1321. ' <div class="pswp__share-tooltip"></div> ',
  1322. ' </div>',
  1323. ' <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>',
  1324. ' <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>',
  1325. ' <div class="pswp__caption">',
  1326. ' <div class="pswp__caption__center"></div>',
  1327. ' </div>',
  1328. ' </div>',
  1329. ' </div>',
  1330. '</div>'
  1331. ].join(""));
  1332. }
  1333.  
  1334.  
  1335. // Find PhotoSwipe items
  1336. function getGalleryItems($gallery){
  1337. var items = [];
  1338.  
  1339. $gallery.find("a").each(function(){
  1340. var $anchor = $(this),
  1341. size = $anchor.attr("data-size").split("x"),
  1342. title = $anchor.attr("data-title"),
  1343. item = {
  1344. el: $anchor.get(0),
  1345. src: $anchor.attr("href"),
  1346. w: parseInt(size[0]),
  1347. h: parseInt(size[1])
  1348. };
  1349.  
  1350. if( title ) item.title = title;
  1351.  
  1352. items.push(item);
  1353. });
  1354.  
  1355. return items;
  1356. }
  1357.  
  1358. function openGallery($gallery, index, items, pswpOptions){
  1359. var $pswp = $(".pswp"),
  1360. owl = $gallery.data("owlCarousel"),
  1361. gallery;
  1362.  
  1363. // オプション値を設定
  1364. var options = $.extend(true, {
  1365. index: index,
  1366.  
  1367. // Find out coordinates from which initial zoom-in animation will start (or zoom-out animation will end).
  1368. getThumbBoundsFn: function(index){
  1369. var $thumbnail = $(items[index].el).find("img"),
  1370. offset = $thumbnail.offset();
  1371. return {
  1372. x: offset.left,
  1373. y: offset.top,
  1374. w: $thumbnail.outerWidth()
  1375. };
  1376. }
  1377. }, pswpOptions);
  1378.  
  1379. gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items, options);
  1380. gallery.init();
  1381.  
  1382. gallery.listen("close", function(){
  1383. this.currItem.initialLayout = options.getThumbBoundsFn(this.getCurrentIndex());
  1384. });
  1385. }
  1386.  
  1387.  
  1388. // 初期化
  1389. function initializeGallery($elem, owlOptions, pswpOptions){
  1390.  
  1391. // If DOM for PhotoSwipe does not exist, render newly
  1392. if( $(".pswp").size() === 0 ){
  1393. buildPswdHtml();
  1394. }
  1395.  
  1396. // Scan to correspond to multiple galleries
  1397. $elem.each(function(i){
  1398. var $gallery = $(this),
  1399. uid = i + 1,
  1400. items = getGalleryItems($gallery),
  1401. options = $.extend(true, {}, pswpOptions);
  1402. // Initialization of OwlCarousel
  1403. $owl = $gallery.owlCarousel(owlOptions);
  1404. console.dir($owl);
  1405.  
  1406. // Assign unique ID to each gallery
  1407. options.galleryUID = uid;
  1408. $gallery.attr("data-pswp-uid", uid);
  1409.  
  1410. // Launch PhotoSwipe with each item click
  1411. $gallery.find(".owl-item").on("click", function(e) {
  1412. if( !$(e.target).is("img") ) return;
  1413. var targetLink = e.target.parentElement,
  1414. targetIndex = items.findIndex(el => el.src === targetLink.getAttribute('href'));
  1415. if (-1 === targetIndex) throw new Error('Underfined index');
  1416.  
  1417. openGallery($gallery, targetIndex, items.concat(), options);
  1418. return false;
  1419. });
  1420. });
  1421. }
  1422.  
  1423. // We perform processing on `.owl-carousel`
  1424. var owlOptions = {
  1425. loop: true,
  1426. margin: 2,
  1427. nav: true,
  1428. navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
  1429. responsive:{
  1430. 0:{
  1431. items:2
  1432. },
  1433. 600:{
  1434. items:3
  1435. },
  1436. 1000:{
  1437. items:4
  1438. }
  1439. }
  1440. },
  1441. tourPreviewHeader = document.getElementById('js-tour-preview'),
  1442. pswpOptions = {
  1443. bgOpacity: 0.9,
  1444. history: false,
  1445. shareEl: false,
  1446. barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHeight : 0, bottom:'auto'}
  1447. };
  1448.  
  1449.  
  1450.  
  1451. initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);
  1452.  
  1453. });
  1454. " ["exception" => Assetic\Exception\FilterException { …},"command" => "assetic:dump --no-debug --env=staging","message" => """ An error occurred while running:\n '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_modules/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_uglifyjs2_indqTpGu'\n \n Error Output:\n Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54\n targetIndex = items.findIndex(el => el.src === targetLink.ge\n ^\n ERROR: Unexpected token: operator (>)\n at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)\n at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:291:53)\n at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:235:9)\n at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/bin/uglifyjs:160:5)\n at Module._compile (internal/modules/cjs/loader.js:654:30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)\n at Module.load (internal/modules/cjs/loader.js:566:32)\n at tryModuleLoad (internal/modules/cjs/loader.js:506:12)\n at Function.Module._load (internal/modules/cjs/loader.js:498:3)\n at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)\n \n \n Input:\n $(document).ready(function(){\n // PhotoSwipe popup HTML\n function buildPswdHtml(){\n $("body").append([\n '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">',\n ' <div class="pswp__bg"></div>',\n ' <div class="pswp__scroll-wrap">',\n ' <div class="pswp__container">',\n ' <div class="pswp__item"></div>',\n ' <div class="pswp__item"></div>',\n ' <div class="pswp__item"></div>',\n ' </div>',\n ' <div class="pswp__ui pswp__ui--hidden">',\n ' <div class="pswp__top-bar">',\n ' <div class="pswp__counter"></div>',\n ' <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>',\n ' <button class="pswp__button pswp__button--share" title="Share"></button>',\n ' <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>',\n ' <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>',\n ' <div class="pswp__preloader">',\n ' <div class="pswp__preloader__icn">',\n ' <div class="pswp__preloader__cut">',\n ' <div class="pswp__preloader__donut"></div>',\n ' </div>',\n ' </div>',\n ' </div>',\n ' </div>',\n ' <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">',\n ' <div class="pswp__share-tooltip"></div> ',\n ' </div>',\n ' <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>',\n ' <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>',\n ' <div class="pswp__caption">',\n ' <div class="pswp__caption__center"></div>',\n ' </div>',\n ' </div>',\n ' </div>',\n '</div>'\n ].join(""));\n }\n \n \n // Find PhotoSwipe items\n function getGalleryItems($gallery){\n var items = [];\n \n $gallery.find("a").each(function(){\n var $anchor = $(this),\n size = $anchor.attr("data-size").split("x"),\n title = $anchor.attr("data-title"),\n item = {\n el: $anchor.get(0),\n src: $anchor.attr("href"),\n w: parseInt(size[0]),\n h: parseInt(size[1])\n };\n \n if( title ) item.title = title;\n \n items.push(item);\n });\n \n return items;\n }\n \n function openGallery($gallery, index, items, pswpOptions){\n var $pswp = $(".pswp"),\n owl = $gallery.data("owlCarousel"),\n gallery;\n \n // オプション値を設定\n var options = $.extend(true, {\n index: index,\n \n // Find out coordinates from which initial zoom-in animation will start (or zoom-out animation will end).\n getThumbBoundsFn: function(index){\n var $thumbnail = $(items[index].el).find("img"),\n offset = $thumbnail.offset();\n return {\n x: offset.left,\n y: offset.top,\n w: $thumbnail.outerWidth()\n };\n }\n }, pswpOptions);\n \n gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items, options);\n gallery.init();\n \n gallery.listen("close", function(){\n this.currItem.initialLayout = options.getThumbBoundsFn(this.getCurrentIndex());\n });\n }\n \n \n // 初期化\n function initializeGallery($elem, owlOptions, pswpOptions){\n \n // If DOM for PhotoSwipe does not exist, render newly\n if( $(".pswp").size() === 0 ){\n buildPswdHtml();\n }\n \n // Scan to correspond to multiple galleries\n $elem.each(function(i){\n var $gallery = $(this),\n uid = i + 1,\n items = getGalleryItems($gallery),\n options = $.extend(true, {}, pswpOptions);\n // Initialization of OwlCarousel\n $owl = $gallery.owlCarousel(owlOptions);\n console.dir($owl);\n \n // Assign unique ID to each gallery\n options.galleryUID = uid;\n $gallery.attr("data-pswp-uid", uid);\n \n // Launch PhotoSwipe with each item click\n $gallery.find(".owl-item").on("click", function(e) {\n if( !$(e.target).is("img") ) return;\n var targetLink = e.target.parentElement,\n targetIndex = items.findIndex(el => el.src === targetLink.getAttribute('href'));\n if (-1 === targetIndex) throw new Error('Underfined index');\n \n openGallery($gallery, targetIndex, items.concat(), options);\n return false;\n });\n });\n }\n \n // We perform processing on `.owl-carousel`\n var owlOptions = {\n loop: true,\n margin: 2,\n nav: true,\n navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>", "<i class='fa fa-angle-right' aria-hidden='true'></i>"],\n responsive:{\n 0:{\n items:2\n },\n 600:{\n items:3\n },\n 1000:{\n items:4\n }\n }\n },\n tourPreviewHeader = document.getElementById('js-tour-preview'),\n pswpOptions = {\n bgOpacity: 0.9,\n history: false,\n shareEl: false,\n barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHeight : 0, bottom:'auto'}\n };\n \n \n \n initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);\n \n });\n """] []
  1455.  
  1456. In FilterException.php line 40:
  1457.  
  1458. An error occurred while running:
  1459. '/usr/bin/node' '/mnt/www/etepia/releases/20180624155856/app/../node_module
  1460. s/.bin/uglifyjs' '-o' '/tmp/assetic_uglifyjs2_outG4LSMD' '/tmp/assetic_ugli
  1461. fyjs2_indqTpGu'
  1462.  
  1463. Error Output:
  1464. Parse error at /tmp/assetic_uglifyjs2_indqTpGu:122,54
  1465. targetIndex = items.findIndex(el => el.src === targetLi
  1466. nk.ge
  1467. ^
  1468. ERROR: Unexpected token: operator (>)
  1469. at JS_Parse_Error.get (eval at <anonymous> (/mnt/www/etepia/releases/20
  1470. 180624155856/node_modules/uglify-js/tools/node.js:21:1), <anonymous>:73:23)
  1471. at fatal (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-j
  1472. s/bin/uglifyjs:291:53)
  1473. at run (/mnt/www/etepia/releases/20180624155856/node_modules/uglify-js/
  1474. bin/uglifyjs:235:9)
  1475. at Object.<anonymous> (/mnt/www/etepia/releases/20180624155856/node_mod
  1476. ules/uglify-js/bin/uglifyjs:160:5)
  1477. at Module._compile (internal/modules/cjs/loader.js:654:30)
  1478. at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10
  1479. )
  1480. at Module.load (internal/modules/cjs/loader.js:566:32)
  1481. at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
  1482. at Function.Module._load (internal/modules/cjs/loader.js:498:3)
  1483. at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
  1484.  
  1485.  
  1486. Input:
  1487. $(document).ready(function(){
  1488. // PhotoSwipe popup HTML
  1489. function buildPswdHtml(){
  1490. $("body").append([
  1491. '<div class="pswp" tabindex="-1" role="dialog" aria-hidden="tru
  1492. e">',
  1493. ' <div class="pswp__bg"></div>',
  1494. ' <div class="pswp__scroll-wrap">',
  1495. ' <div class="pswp__container">',
  1496. ' <div class="pswp__item"></div>',
  1497. ' <div class="pswp__item"></div>',
  1498. ' <div class="pswp__item"></div>',
  1499. ' </div>',
  1500. ' <div class="pswp__ui pswp__ui--hidden">',
  1501. ' <div class="pswp__top-bar">',
  1502. ' <div class="pswp__counter"></div>',
  1503. ' <button class="pswp__button pswp__button--close" tit
  1504. le="Close (Esc)"></button>',
  1505. ' <button class="pswp__button pswp__button--share" tit
  1506. le="Share"></button>',
  1507. ' <button class="pswp__button pswp__button--fs" title=
  1508. "Toggle fullscreen"></button>',
  1509. ' <button class="pswp__button pswp__button--zoom" titl
  1510. e="Zoom in/out"></button>',
  1511. ' <div class="pswp__preloader">',
  1512. ' <div class="pswp__preloader__icn">',
  1513. ' <div class="pswp__preloader__cut">',
  1514. ' <div class="pswp__preloader__donut"></div>',
  1515. ' </div>',
  1516. ' </div>',
  1517. ' </div>',
  1518. ' </div>',
  1519. ' <div class="pswp__share-modal pswp__share-modal--hidden
  1520. pswp__single-tap">',
  1521. ' <div class="pswp__share-tooltip"></div> ',
  1522. ' </div>',
  1523. ' <button class="pswp__button pswp__button--arrow--left" t
  1524. itle="Previous (arrow left)"></button>',
  1525. ' <button class="pswp__button pswp__button--arrow--right"
  1526. title="Next (arrow right)"></button>',
  1527. ' <div class="pswp__caption">',
  1528. ' <div class="pswp__caption__center"></div>',
  1529. ' </div>',
  1530. ' </div>',
  1531. ' </div>',
  1532. '</div>'
  1533. ].join(""));
  1534. }
  1535.  
  1536.  
  1537. // Find PhotoSwipe items
  1538. function getGalleryItems($gallery){
  1539. var items = [];
  1540.  
  1541. $gallery.find("a").each(function(){
  1542. var $anchor = $(this),
  1543. size = $anchor.attr("data-size").split("x"),
  1544. title = $anchor.attr("data-title"),
  1545. item = {
  1546. el: $anchor.get(0),
  1547. src: $anchor.attr("href"),
  1548. w: parseInt(size[0]),
  1549. h: parseInt(size[1])
  1550. };
  1551.  
  1552. if( title ) item.title = title;
  1553.  
  1554. items.push(item);
  1555. });
  1556.  
  1557. return items;
  1558. }
  1559.  
  1560. function openGallery($gallery, index, items, pswpOptions){
  1561. var $pswp = $(".pswp"),
  1562. owl = $gallery.data("owlCarousel"),
  1563. gallery;
  1564.  
  1565. // オプション値を設定
  1566. var options = $.extend(true, {
  1567. index: index,
  1568.  
  1569. // Find out coordinates from which initial zoom-in animation wi
  1570. ll start (or zoom-out animation will end).
  1571. getThumbBoundsFn: function(index){
  1572. var $thumbnail = $(items[index].el).find("img"),
  1573. offset = $thumbnail.offset();
  1574. return {
  1575. x: offset.left,
  1576. y: offset.top,
  1577. w: $thumbnail.outerWidth()
  1578. };
  1579. }
  1580. }, pswpOptions);
  1581.  
  1582. gallery = new PhotoSwipe($pswp.get(0), PhotoSwipeUI_Default, items,
  1583. options);
  1584. gallery.init();
  1585.  
  1586. gallery.listen("close", function(){
  1587. this.currItem.initialLayout = options.getThumbBoundsFn(this.get
  1588. CurrentIndex());
  1589. });
  1590. }
  1591.  
  1592.  
  1593. // 初期化
  1594. function initializeGallery($elem, owlOptions, pswpOptions){
  1595.  
  1596. // If DOM for PhotoSwipe does not exist, render newly
  1597. if( $(".pswp").size() === 0 ){
  1598. buildPswdHtml();
  1599. }
  1600.  
  1601. // Scan to correspond to multiple galleries
  1602. $elem.each(function(i){
  1603. var $gallery = $(this),
  1604. uid = i + 1,
  1605. items = getGalleryItems($gallery),
  1606. options = $.extend(true, {}, pswpOptions);
  1607. // Initialization of OwlCarousel
  1608. $owl = $gallery.owlCarousel(owlOptions);
  1609. console.dir($owl);
  1610.  
  1611. // Assign unique ID to each gallery
  1612. options.galleryUID = uid;
  1613. $gallery.attr("data-pswp-uid", uid);
  1614.  
  1615. // Launch PhotoSwipe with each item click
  1616. $gallery.find(".owl-item").on("click", function(e) {
  1617. if( !$(e.target).is("img") ) return;
  1618. var targetLink = e.target.parentElement,
  1619. targetIndex = items.findIndex(el => el.src === targetLi
  1620. nk.getAttribute('href'));
  1621. if (-1 === targetIndex) throw new Error('Underfined index')
  1622. ;
  1623.  
  1624. openGallery($gallery, targetIndex, items.concat(), options)
  1625. ;
  1626. return false;
  1627. });
  1628. });
  1629. }
  1630.  
  1631. // We perform processing on `.owl-carousel`
  1632. var owlOptions = {
  1633. loop: true,
  1634. margin: 2,
  1635. nav: true,
  1636. navText: ["<i class='fa fa-angle-left' aria-hidden='true'></i>"
  1637. , "<i class='fa fa-angle-right' aria-hidden='true'></i>"],
  1638. responsive:{
  1639. 0:{
  1640. items:2
  1641. },
  1642. 600:{
  1643. items:3
  1644. },
  1645. 1000:{
  1646. items:4
  1647. }
  1648. }
  1649. },
  1650. tourPreviewHeader = document.getElementById('js-tour-preview'),
  1651. pswpOptions = {
  1652. bgOpacity: 0.9,
  1653. history: false,
  1654. shareEl: false,
  1655. barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHei
  1656. ght : 0, bottom:'auto'}
  1657. };
  1658.  
  1659.  
  1660.  
  1661. initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);
  1662.  
  1663. });
  1664.  
  1665.  
  1666. assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--jms-job-id JMS-JOB-ID] [--] <command> [<write_to>]
  1667. ** Invoke deploy:failed (first_time)
  1668. ** Execute deploy:failed
  1669.  
  1670.  
  1671. ** DEPLOY FAILED
  1672. ** Refer to log/capistrano.log for details. Here are the last 20 lines:
  1673.  
  1674.  
  1675. DEBUG [eee13b4d] tourPreviewHeader = document.getElementById('js-tour-preview'),
  1676.  
  1677. DEBUG [eee13b4d] pswpOptions = {
  1678.  
  1679. bgOpacity: 0.9,
  1680.  
  1681. DEBUG [eee13b4d]
  1682.  
  1683. history: false,
  1684.  
  1685. DEBUG [eee13b4d]
  1686.  
  1687. DEBUG [eee13b4d] shareEl: false,
  1688.  
  1689. DEBUG [eee13b4d] barsSize: {top: tourPreviewHeader ? tourPreviewHeader.clientHei
  1690.  
  1691. DEBUG [eee13b4d] ght : 0, bottom:'auto'}
  1692.  
  1693. DEBUG [eee13b4d] };
  1694.  
  1695. DEBUG [eee13b4d]
  1696.  
  1697. DEBUG [eee13b4d]
  1698.  
  1699. DEBUG [eee13b4d]
  1700.  
  1701. initializeGallery($(".owl-carousel"), owlOptions, pswpOptions);
  1702.  
  1703. DEBUG [eee13b4d]
  1704.  
  1705. });
  1706.  
  1707. DEBUG [eee13b4d]
  1708.  
  1709.  
  1710.  
  1711. DEBUG [eee13b4d] assetic:dump [--forks FORKS] [--watch] [--force] [--period PERIOD] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--jms-job-id JMS-JOB-ID] [--] <command> [<write_to>]
Add Comment
Please, Sign In to add comment