Skip to content

Commit

Permalink
frontend move-out
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Apr 3, 2024
1 parent 534b7f6 commit 733c8fb
Show file tree
Hide file tree
Showing 31 changed files with 46 additions and 512 deletions.
14 changes: 0 additions & 14 deletions demo-webly/bb.edn

This file was deleted.

9 changes: 6 additions & 3 deletions demo-webly/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
"resources"]
:deps {org.pinkgorilla/webly {:local/root "../webly" :deps/manifest :deps}
; lazy ui modules:
org.pinkgorilla/ui-highcharts {:mvn/version "0.0.26"}
org.pinkgorilla/ui-vega {:mvn/version "0.0.31"}}
org.pinkgorilla/ui-highcharts {:mvn/version "0.0.27"}
org.pinkgorilla/ui-vega {:mvn/version "0.0.31"}
org.pinkgorilla/ui-tailwind {:mvn/version "0.0.5"}
org.pinkgorilla/oauth2 {:mvn/version "0.0.25"}
}
:aliases
{:test-clj {:extra-paths ["src"
"resources"
Expand All @@ -26,7 +29,7 @@

; BUILD BUNDLE (then exit)
:webly {:extra-deps {org.pinkgorilla/ui-repl {:mvn/version "0.1.92"} ; http cors test
org.pinkgorilla/ui-tailwind {:mvn/version "0.0.5"}}
}
:extra-paths ["src" "resources" "test" "test/resources"]
:exec-fn webly.app.app/webly-build
:exec-args {:config ["demo.edn"
Expand Down
1 change: 0 additions & 1 deletion demo-webly/resources/META-INF/pink-gorilla/webly/meta.edn

This file was deleted.

36 changes: 17 additions & 19 deletions demo-webly/src/demo/page/help.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,24 @@
(def data-config (r/atom {:data nil}))
(def firstt (r/atom true))


(defn help [_route]
(let [url-moon (str (get-resource-path) "demo/moon.jpg")
url-config (str (get-resource-path) "config.edn")
]
[:div
[:h1 "webly help"]
(when @firstt
(reset! firstt false)
(get-json "http://api.open-notify.org/iss-now.json" data-iss [:data]) ;cors test
(get-json url-config data-config [:data])
nil)
[:p [link-dispatch [:bidi/goto :demo/main] "main"]]
[:p "url config: " url-config]
[:h1 "help!"]
[:div.bg-blue-300 "iss data (cors test - there should be data coming!):" (pr-str @data-iss)]
[:div.bg-red-300 "config data:" (pr-str @data-config)]

[:p "a moon image should show below. this is a test for webly resource handler."]
[:p "moon url: " url-moon]
[:img {:src url-moon }]]))
url-config (str (get-resource-path) "config.edn")]
[:div
[:h1 "webly help"]
(when @firstt
(reset! firstt false)
(get-json "http://api.open-notify.org/iss-now.json" data-iss [:data]) ;cors test
(get-json url-config data-config [:data])
nil)
[:p [link-dispatch [:bidi/goto :demo/main] "main"]]
[:p "url config: " url-config]
[:h1 "help!"]
[:div.bg-blue-300 "iss data (cors test - there should be data coming!):" (pr-str @data-iss)]
[:div.bg-red-300 "config data:" (pr-str @data-config)]

[:p "a moon image should show below. this is a test for webly resource handler."]
[:p "moon url: " url-moon]
[:img {:src url-moon}]]))


2 changes: 1 addition & 1 deletion demo-webly/src/demo/page/main/lazy.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
(println "*** NS LOAD ERROR: err: " x)))))

(defn load-namespace-highcharts [& _]
(let [rp (load-namespace 'ui.highcharts )]
(let [rp (load-namespace 'ui.highcharts)]
(p/then rp (fn [r]
(println "*** NS HIGHCHARTS LOAD SUCCESS: " r)))
(p/catch rp (fn [x]
Expand Down
19 changes: 6 additions & 13 deletions demo-webly/src/demo/test.clj
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
(ns demo.test
(:require
[extension :refer [discover write-service]]
[bidi.bidi :as bidi]
[bidi.bidi :as bidi]

[webly.module.build :refer [create-modules shadow-module-config
create-modules
get-lazy-ns
]]))
create-modules
get-lazy-ns]]))

(defn test [& _]
(println "creating modules..")
Expand All @@ -16,23 +15,17 @@
(write-service exts :shadow-modules shadow-modules)
(println "creating modules..done!")))

(comment

(comment

(->> (bidi/tag :demo/job :wunderbar)
pr-str
)



pr-str)

(def exts (discover))

(def modules (create-modules exts))


(get-lazy-ns)
(macroexpand (get-lazy-ns))

;
)
38 changes: 0 additions & 38 deletions demo-webly/test/webly/css_test.clj

This file was deleted.

4 changes: 2 additions & 2 deletions demo-webly/test/webly/resource_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
; routing is tested in routes-test

#_(deftest app-html []
(is (= "text/html; charset=utf-8"
(-> "/" GET content-type)))) ; the url can be any valid frontend route
(is (= "text/html; charset=utf-8"
(-> "/" GET content-type)))) ; the url can be any valid frontend route

; cljs-bundle

Expand Down
4 changes: 2 additions & 2 deletions demo-webly/test/webly/routes_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#_(deftest path->handler []
;(is (= (:handler (GET "/")) :demo/main))
;(is (= (:handler (GET "/help")) :demo/help))
(is (= (:handler (GET "/api/time")) 'demo.handler/time-handler))
(is (= (:handler (POST "/api/test")) 'demo.handler.test/test-handler)))
(is (= (:handler (GET "/api/time")) 'demo.handler/time-handler))
(is (= (:handler (POST "/api/test")) 'demo.handler.test/test-handler)))

(deftest resource-routes []
(is (not (= (:handler (GET "/r/webly/icon/silver.ico")) nil)))
Expand Down
25 changes: 0 additions & 25 deletions frontend/README-analytics.md

This file was deleted.

7 changes: 0 additions & 7 deletions frontend/deps.edn

This file was deleted.

30 changes: 0 additions & 30 deletions frontend/src/frontend/analytics/events.cljs

This file was deleted.

47 changes: 0 additions & 47 deletions frontend/src/frontend/analytics/google_tag.cljc

This file was deleted.

31 changes: 0 additions & 31 deletions frontend/src/frontend/css/config.cljc

This file was deleted.

53 changes: 0 additions & 53 deletions frontend/src/frontend/css/dom.cljs

This file was deleted.

Loading

0 comments on commit 733c8fb

Please sign in to comment.