diff --git a/package.json b/package.json index 859f612c856..4b78ec29745 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "start": "grunt serve", "build": "grunt", "webyarns:build:babel": "babel --extensions '.ts,.js' webyarns-util/src -d webyarns-util/lib", - "webyarns:build:all": "uglifyjs-folder webyarns-util/lib -e -o webyarns-util/lib/ --pattern \"*.js,!*.min.js\" ", + "webyarns:build:all": "uglifyjs-folder webyarns-util/lib -e -o webyarns-util/lib/ --pattern \"*.js,!*.min.js\" --config-file=uglify.json ", "webyarns:build": "npm-run-all webyarns:build:*", "webyarns:watch": "babel --extensions '.ts,.js' webyarns-util/src -d webyarns-util/lib --watch --source-maps inline", "test-webyarns": "jest", diff --git a/uglify.json b/uglify.json new file mode 100644 index 00000000000..bf83ac2f593 --- /dev/null +++ b/uglify.json @@ -0,0 +1,5 @@ +{ + "output": { + "preamble": "// version 3.8.0.4" + } +} diff --git a/webyarns-util/lib/audio-ios-initialiser.min.js b/webyarns-util/lib/audio-ios-initialiser.min.js index 2158f79f6af..21096053086 100644 --- a/webyarns-util/lib/audio-ios-initialiser.min.js +++ b/webyarns-util/lib/audio-ios-initialiser.min.js @@ -1 +1,2 @@ +// version 3.8.0.4 "use strict";!function(){function t(e){e.preventDefault(),document.querySelectorAll("audio").forEach(function(e){e.play().then(function(){return e.pause()})}),Reveal.next()}document.addEventListener("DOMContentLoaded",function(){console.log("Deprecated script: audio-ios-initialiser. Is no longer needed");var n=document.getElementById("ipad-audio-init");n&&["touchstart","click"].forEach(function(e){return n.addEventListener(e,t)})})}(); \ No newline at end of file diff --git a/webyarns-util/lib/auto-video-play.min.js b/webyarns-util/lib/auto-video-play.min.js index 6935018b474..48f071c8d95 100644 --- a/webyarns-util/lib/auto-video-play.min.js +++ b/webyarns-util/lib/auto-video-play.min.js @@ -1 +1,2 @@ +// version 3.8.0.4 "use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=e():(Object.assign(window,e()),window.addEventListener("DOMContentLoaded",function(){Reveal.addEventListener("ready",window.autoplayVideo),Reveal.addEventListener("slidechanged",window.autoplayVideo)}))}(function(){return console.log("Deprecated script: auto-video-play.ts. Use reveal's built-in support https://revealjs.com/media/#autoplay (data-autoplay)"),{autoplayVideo:function(e){e.currentSlide.querySelectorAll("video[data-autostart]").forEach(function(e){e instanceof HTMLVideoElement&&e.play()}),e.previousSlide&&e.previousSlide.querySelectorAll("video[data-autostart]").forEach(function(e){e instanceof HTMLVideoElement&&e.pause()})}}}); \ No newline at end of file diff --git a/webyarns-util/lib/credits.min.js b/webyarns-util/lib/credits.min.js index 930447643ee..2d86ae5c535 100644 --- a/webyarns-util/lib/credits.min.js +++ b/webyarns-util/lib/credits.min.js @@ -1 +1,2 @@ +// version 3.8.0.4 "use strict";!function(){var r,t=!1,o=0;Reveal.addEventListener("slidechanged",function(e){if("credits"===e.currentSlide.id){var l=document.getElementById("scrollTitles");l.scrollTop=0,r=setInterval(function(e){return function(){t?(e.scrollTop=o=0,t=0!==e.scrollTop,e.scrollTop=o,o--):(e.scrollTop=o,o++,t=e.scrollTop>=e.scrollHeight-e.offsetHeight)}}(l),30)}"credits"===e.previousSlide&&clearInterval(r)})}(); \ No newline at end of file diff --git a/webyarns-util/lib/helpers.min.js b/webyarns-util/lib/helpers.min.js index 0582f1f9563..e6e61c4a72c 100644 --- a/webyarns-util/lib/helpers.min.js +++ b/webyarns-util/lib/helpers.min.js @@ -1 +1,2 @@ +// version 3.8.0.4 "use strict";function _typeof(n){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}!function(n){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=n(!0):window.Webyarns=n()}(function(){function c(n){return Array.from(n.attributes).map(function(n){return n.name})}function n(i){return function n(t,e,o){var r=2")||t.startsWith("#")?t.substring(1):t}function f(t){return t?t.split(",").map(function(t){return t.trim()}):[]}function d(t,r){var e=_slicedToArray(function(t,i){return t.reduce(function(t,r){var e=_slicedToArray(t,2),n=e[0],o=e[1];return i(r)?[[].concat(_toConsumableArray(n),[r]),o]:[n,[].concat(_toConsumableArray(o),[r])]},[[],[]])}(r,function(t){return t.startsWith("!")}),2),n=e[0],o=e[1],i=o.filter(function(t){return t.startsWith("#")}).map(s),a=o.filter(function(t){return t.startsWith(">")}).map(s);p=[].concat(_toConsumableArray(p),_toConsumableArray(a));var u=t.map(s),l=r.map(s),c=n.map(s);return[[].concat(_toConsumableArray(u.filter(function(t){return!o.includes(t)}).filter(function(t){return!c.includes(t)}).filter(function(t){return-1===p.indexOf(t)})),_toConsumableArray(i)),[].concat(_toConsumableArray(l.filter(function(t){return!u.includes(t)}).filter(function(t){return!i.includes(t)})),_toConsumableArray(c))]}var t,n=null==(t=document.getElementById("sounds"))?(console.error('Cannot find