-
Notifications
You must be signed in to change notification settings - Fork 0
/
compact.cirru
51 lines (50 loc) · 1.95 KB
/
compact.cirru
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{} (:package |lib)
:configs $ {} (:init-fn |lib.test/main!) (:reload-fn |lib.test/reload!) (:version |0.0.1)
:modules $ []
:entries $ {}
:files $ {}
|lib.core $ %{} :FileEntry
:defs $ {}
|path-exists? $ %{} :CodeEntry (:doc |)
:code $ quote
defn path-exists? (name)
&call-dylib-edn (get-dylib-path "\"/dylibs/libcalcit_std") "\"path_exists" name
:ns $ %{} :CodeEntry (:doc |)
:code $ quote
ns lib.core $ :require
lib.$meta :refer $ calcit-dirname
lib.util :refer $ get-dylib-path
|lib.test $ %{} :FileEntry
:defs $ {}
|main! $ %{} :CodeEntry (:doc |)
:code $ quote
defn main! () $ run-tests
|reload! $ %{} :CodeEntry (:doc |)
:code $ quote
defn reload! $
|run-tests $ %{} :CodeEntry (:doc |)
:code $ quote
defn run-tests () (println "\"%%%% test for lib") (println calcit-filename calcit-dirname)
println (path-exists? "\"README.md") (path-exists? "\"build.js")
:ns $ %{} :CodeEntry (:doc |)
:code $ quote
ns lib.test $ :require
lib.core :refer $ path-exists?
lib.$meta :refer $ calcit-dirname calcit-filename
|lib.util $ %{} :FileEntry
:defs $ {}
|get-dylib-ext $ %{} :CodeEntry (:doc |)
:code $ quote
defmacro get-dylib-ext () $ case-default (&get-os) "\".so" (:macos "\".dylib") (:windows "\".dll")
|get-dylib-path $ %{} :CodeEntry (:doc |)
:code $ quote
defn get-dylib-path (p)
str (or-current-path calcit-dirname) p $ get-dylib-ext
|or-current-path $ %{} :CodeEntry (:doc |)
:code $ quote
defn or-current-path (p)
if (blank? p) "\"." p
:ns $ %{} :CodeEntry (:doc |)
:code $ quote
ns lib.util $ :require
lib.$meta :refer $ calcit-dirname calcit-filename