This commit is contained in:
kloimhardt 2021-06-01 15:25:42 +02:00
parent 500f104c1a
commit 5efba438ee
4 changed files with 21 additions and 2 deletions

View file

@ -7,7 +7,9 @@
reagent/reagent {:mvn/version "1.0.0"}
cljsjs/react {:mvn/version "17.0.2-0"}
cljsjs/react-dom {:mvn/version "17.0.2-0"}
cljsjs/react-dom-server {:mvn/version "17.0.2-0"}}
cljsjs/react-dom-server {:mvn/version "17.0.2-0"}
cljs-ajax/cljs-ajax {:mvn/version "0.8.3"}
}
:aliases
{:dev

View file

@ -16,6 +16,8 @@
{:scittle {:entries [scittle.core]}
:scittle.reagent {:entries [scittle.reagent]
:depends-on #{:scittle}}
:scittle.ajax {:entries [scittle.ajax]
:depends-on #{:scittle}}
:scittle.makro-plugin {:entries [scittle.makro-plugin]
:depends-on #{:scittle}}}
:build-hooks [(shadow.cljs.build-report/hook)]

14
src/scittle/ajax.cljs Normal file
View file

@ -0,0 +1,14 @@
(ns scittle.ajax
(:require [ajax.core :as ajx]
[sci.core :as sci]
[scittle.core :as scittle]))
(def rns (sci/create-ns 'ajax.core nil))
(def ajax-namespace
{'GET (sci/copy-var ajx/GET rns)
'POST (sci/copy-var ajx/POST rns)})
(scittle/register-plugin!
::ajax
{:namespaces {'ajax.core ajax-namespace}})

View file

@ -7,7 +7,8 @@
(def rns (sci/create-ns 'reagent.core nil))
(def reagent-namespace
{'atom (sci/copy-var r/atom rns)})
{'atom (sci/copy-var r/atom rns)
'cursor (sci/copy-var r/cursor rns)})
(def rdns (sci/create-ns 'reagent.dom nil))