From aeff49b3e666957e74093a80b0b68d7e5916b810 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 2 Apr 2016 23:17:52 +0300 Subject: [PATCH] Add externs for interop calls and enable advanced compilation. --- resources/externs/main.js | 29 +++++++++++++++++++++++++++++ scripts/dist.clj | 4 +++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 resources/externs/main.js diff --git a/resources/externs/main.js b/resources/externs/main.js new file mode 100644 index 000000000..be5aed904 --- /dev/null +++ b/resources/externs/main.js @@ -0,0 +1,29 @@ +var TopLevel = { + "offsetX": function() {}, + "offsetY": function() {}, + "nativeEvent": function() {}, + "target": function() {}, + "dataTransfer": function() {}, + "dropEffect": function() {}, + "value": function() {}, + "offsetHeight": function() {}, + "offsetWidth": function() {}, + "scrollTop": function() {}, + "scrollLeft": function() {}, + "refs": function() {}, + "ctrlKey": function() {}, + "shiftKey": function() {}, + "keyCode": function() {}, + "currentTarget": function() {}, + "createObjectURL": function() {}, + "URL": function() {}, + "innerHTML": function() {}, + "getElementById": function() {}, + "clientX": function() {}, + "clientY": function() {}, + "href": function() {}, + "value": function() {}, + "identifier": function() {}, + "getBoundingClientRect": function() {}, + "getBBox": function() {} +}; diff --git a/scripts/dist.clj b/scripts/dist.clj index 15a1c7ffa..b91f56cad 100644 --- a/scripts/dist.clj +++ b/scripts/dist.clj @@ -16,7 +16,9 @@ :output-dir "resources/public/js" :closure-defines {"uxbox.repo.core.url" "https://test.uxbox.io/api"} - :optimizations :simple + :optimizations :advanced + :externs ["externs/main.js"] + :source-map "resources/public/js/main.js.map" :static-fns true :language-in :ecmascript5 :language-out :ecmascript5