From 483060c6cc16ee11fa0478b6fa45a9e06daeaa38 Mon Sep 17 00:00:00 2001 From: Chris Badahdah Date: Fri, 20 Sep 2024 18:44:32 -0700 Subject: [PATCH] Side load `portal.ui.repl.sci.eval` --- dev/portal/setup.cljs | 7 +++---- shadow-cljs.edn | 4 +++- src/portal/extensions/vs_code_notebook.cljs | 1 - src/portal/ui/core.cljs | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dev/portal/setup.cljs b/dev/portal/setup.cljs index 7b62b95a..9bece275 100644 --- a/dev/portal/setup.cljs +++ b/dev/portal/setup.cljs @@ -1,14 +1,14 @@ (ns portal.setup (:require [clojure.datafy :refer [datafy]] [examples.data :refer [data]] + [portal.client.web :as remote] [portal.console :as log] [portal.runtime :as rt] - [portal.shadow.remote :as remote] + #_[portal.shadow.remote :as remote] [portal.shortcuts :as shortcuts] [portal.ui.api :as api] [portal.ui.commands :as commands] [portal.ui.inspector :as ins] - [portal.ui.repl.sci.eval :as sci] [portal.ui.rpc :as rpc] [portal.ui.select :as select] [portal.ui.state :as state] @@ -44,7 +44,7 @@ (defn submit [value] (let [value (datafy value)] - (comment (remote/submit value)) + (remote/submit {:encoding :cson :port js/location.port} value) (dashboard-submit value))) (defn async-submit [value] @@ -77,7 +77,6 @@ [["Portal Client" (section "Taps" tap-list) (section "State" state/state) - (section "SCI Context" sci/ctx) ["RPC" (section "Logs" state/log)] (section "Viewers" api/viewers) diff --git a/shadow-cljs.edn b/shadow-cljs.edn index c2ea758a..6650ccb1 100644 --- a/shadow-cljs.edn +++ b/shadow-cljs.edn @@ -15,7 +15,9 @@ :warnings-as-errors true :output-feature-set :es2018} :build-hooks [(portal.shadow.remote/hook {:port 53755})] - :modules {:main {:init-fn portal.ui.core/main!}} + :modules {:main {:init-fn portal.ui.core/main! + :entries [portal.ui.core + portal.ui.repl.sci.eval]}} :release {:output-dir "resources/portal/"} :devtools {:after-load portal.ui.core/reload! :use-document-host false diff --git a/src/portal/extensions/vs_code_notebook.cljs b/src/portal/extensions/vs_code_notebook.cljs index 5f527fb3..024efc4b 100644 --- a/src/portal/extensions/vs_code_notebook.cljs +++ b/src/portal/extensions/vs_code_notebook.cljs @@ -8,7 +8,6 @@ [portal.ui.inspector :as ins] [portal.ui.load :as load] [portal.ui.options :as opts] - [portal.ui.repl.sci.eval] [portal.ui.rpc :as rpc] [portal.ui.state :as state] [reagent.core :as r] diff --git a/src/portal/ui/core.cljs b/src/portal/ui/core.cljs index b8cc0982..b0950b20 100644 --- a/src/portal/ui/core.cljs +++ b/src/portal/ui/core.cljs @@ -7,7 +7,6 @@ [portal.ui.inspector :as ins] [portal.ui.options :as opts] [portal.ui.react :refer [use-effect]] - [portal.ui.repl.sci.eval] [portal.ui.rpc :as rpc] [portal.ui.state :as state] [reagent.core :as r]