ajax -> cljs-ajax
This commit is contained in:
parent
a376ffb66b
commit
4bab6e58e1
4 changed files with 9 additions and 21 deletions
|
|
@ -18,12 +18,10 @@
|
|||
{:scittle {:entries [scittle.core]}
|
||||
:scittle.reagent {:entries [scittle.reagent]
|
||||
:depends-on #{:scittle}}
|
||||
:scittle.ajax {:entries [scittle.ajax]
|
||||
:depends-on #{:scittle}}
|
||||
:scittle.cljs-ajax {:entries [scittle.cljs-ajax]
|
||||
:depends-on #{:scittle}}
|
||||
:scittle.qlkit {:entries [scittle.qlkit]
|
||||
:depends-on #{:scittle}}
|
||||
:scittle.cljs {:entries [scittle.cljs]
|
||||
:depends-on #{:scittle}}}
|
||||
:depends-on #{:scittle}}}
|
||||
:build-hooks [(shadow.cljs.build-report/hook)]
|
||||
:output-dir "resources/public/js"
|
||||
:devtools {:repl-pprint true}
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
(ns scittle.cljs
|
||||
(:require [cljs.reader :refer [read-string]]
|
||||
[sci.core :as sci]
|
||||
[scittle.core :as scittle]))
|
||||
|
||||
(def rns (sci/create-ns 'cljs.reader nil))
|
||||
|
||||
(def cljs-reader-namespace
|
||||
{'read-string (sci/copy-var read-string rns)})
|
||||
|
||||
(scittle/register-plugin!
|
||||
::ajax
|
||||
{:namespaces {'cljs.reader cljs-reader-namespace}})
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
(ns scittle.ajax
|
||||
(ns scittle.cljs-ajax
|
||||
(:require [ajax.core :as ajx]
|
||||
[sci.core :as sci]
|
||||
[scittle.core :as scittle]))
|
||||
|
|
@ -3,7 +3,8 @@
|
|||
(:require [goog.object :as gobject]
|
||||
[goog.string]
|
||||
[sci.core :as sci]
|
||||
[scittle.impl.error :as error]))
|
||||
[scittle.impl.error :as error]
|
||||
[cljs.reader :refer [read-string]]))
|
||||
|
||||
(clojure.core/defmacro time
|
||||
"Evaluates expr and prints the time it took. Returns the value of expr."
|
||||
|
|
@ -17,6 +18,7 @@
|
|||
|
||||
(def stns (sci/create-ns 'sci.script-tag nil))
|
||||
(def cljns (sci/create-ns 'clojure.core nil))
|
||||
(def rns (sci/create-ns 'cljs.reader nil))
|
||||
|
||||
(def namespaces
|
||||
{'clojure.core
|
||||
|
|
@ -24,7 +26,8 @@
|
|||
'prn prn
|
||||
'system-time system-time
|
||||
'time (sci/copy-var time cljns)
|
||||
'random-uuid random-uuid}
|
||||
'random-uuid random-uuid
|
||||
'read-string (sci/copy-var read-string rns)}
|
||||
'goog.object {'set gobject/set
|
||||
'get gobject/get}})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue