Guest User

Untitled

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