diff options
author | Robert Jaros <rjaros@finn.pl> | 2018-03-31 02:37:23 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2018-03-31 02:37:23 +0200 |
commit | 64220ea619eb70eb720d29b456ab9b04bf8b04d3 (patch) | |
tree | 4414de8eaf23f9cd2de1ca7bedb47f8e9474fa96 /src | |
parent | 23ec0310655f036bb9a602d173c1e2a38f3c7073 (diff) | |
download | kvision-64220ea619eb70eb720d29b456ab9b04bf8b04d3.tar.gz kvision-64220ea619eb70eb720d29b456ab9b04bf8b04d3.tar.bz2 kvision-64220ea619eb70eb720d29b456ab9b04bf8b04d3.zip |
Make some dependencies optional.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/KVManager.kt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt index ee7b2d43..1d1a3dc7 100644 --- a/src/main/kotlin/pl/treksoft/kvision/KVManager.kt +++ b/src/main/kotlin/pl/treksoft/kvision/KVManager.kt @@ -134,10 +134,15 @@ internal object KVManager { require("bootstrap-fileinput/themes/explorer-fa/theme.min.js") } catch (e: Throwable) { } - - private val resizable = require("jquery-resizable-dom") + private val resizable = try { + require("jquery-resizable-dom") + } catch (e: Throwable) { + } + private val handlebars = try { + require("handlebars/dist/handlebars.runtime.min.js") + } catch (e: Throwable) { + } internal val fecha = require("fecha") - private val handlebars = require("handlebars/dist/handlebars.runtime.min.js") private val sdPatch = Snabbdom.init( arrayOf( classModule, attributesModule, propsModule, styleModule, |