From 113efc1d239564e0a5870b8b68817d81ec795d11 Mon Sep 17 00:00:00 2001 From: Ozbolt Menegatti Date: Mon, 30 Mar 2020 20:27:58 +0200 Subject: [PATCH] ske library support --- package.json | 1 + src/lib/ske.py | 5 +++++ src/model/model.py | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 src/lib/ske.py diff --git a/package.json b/package.json index 678c482..2546d5b 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "browserify": "^16.5.0", "esmify": "^2.1.1", "picnic": "^6.5.2", + "ske-lexonomy": "^0.0.x", "snabbdom": "^0.7.4", "tinyify": "^2.5.2" } diff --git a/src/lib/ske.py b/src/lib/ske.py new file mode 100644 index 0000000..c306969 --- /dev/null +++ b/src/lib/ske.py @@ -0,0 +1,5 @@ +__pragma__ ('noanno') +__pragma__ ('js', "var s_ske = require('ske-lexonomy');", None) + +# export the symbols +SkeLexonomy = s_ske diff --git a/src/model/model.py b/src/model/model.py index b8673c3..c0b8f2a 100644 --- a/src/model/model.py +++ b/src/model/model.py @@ -2,6 +2,7 @@ from model.entry import Entry from model.example import Example from browser import window from model.example_clusters import ExampleClusters +from lib import ske class Model: @@ -30,6 +31,9 @@ class Model: # hiding cluster numbers self.clusters_shown = True + + # ske interface + self.ske = __new__(ske.SkeLexonomy()); def reset(self): # do both resets at once