From 64220ea619eb70eb720d29b456ab9b04bf8b04d3 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Sat, 31 Mar 2018 02:37:23 +0200 Subject: Make some dependencies optional. --- src/main/kotlin/pl/treksoft/kvision/KVManager.kt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/main/kotlin') 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, -- cgit