Skip to content

Commit

Permalink
Switch to javascript version
Browse files Browse the repository at this point in the history
  • Loading branch information
stwa committed May 15, 2020
1 parent 29a7c25 commit 4943a2d
Show file tree
Hide file tree
Showing 50 changed files with 6 additions and 2,392 deletions.
22 changes: 0 additions & 22 deletions env/dev/clj/tales/middleware.clj

This file was deleted.

31 changes: 0 additions & 31 deletions env/dev/clj/tales/repl.clj

This file was deleted.

17 changes: 0 additions & 17 deletions env/dev/cljs/tales/cards.cljs

This file was deleted.

9 changes: 0 additions & 9 deletions env/dev/cljs/tales/dev.cljs

This file was deleted.

7 changes: 0 additions & 7 deletions env/prod/cljs/tales/prod.cljs

This file was deleted.

87 changes: 6 additions & 81 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,9 @@
[hiccup "1.0.5"]
[me.raynes/fs "1.4.6"]
[yogthos/config "1.1.1"]
[org.clojure/clojurescript "1.10.339" :scope "provided"]
[reagent "0.8.1"]
[reagent-utils "0.3.1"]
[re-frame "0.10.6"]
[day8.re-frame/http-fx "0.1.6"]
[day8.re-frame/test "0.1.5"]
[secretary "1.2.3"]
[thi.ng/geom "1.0.0-RC3"]
[venantius/accountant "0.2.4"]]

:plugins [[lein-asset-minifier "0.2.7" :exclusions [org.clojure/clojure]]
[lein-cljsbuild "1.1.7"]
[lein-environ "1.1.0"]
:plugins [[lein-environ "1.1.0"]
[me.arrdem/lein-git-version "2.0.8"]]

:git-version {:status-to-version
Expand All @@ -50,83 +40,18 @@
:main tales.server

:clean-targets ^{:protect false} [:target-path
[:cljsbuild :builds :app :compiler :output-dir]
[:cljsbuild :builds :app :compiler :output-to]]
[:builds :app :compiler :output-dir]
[:builds :app :compiler :output-to]]

:source-paths ["src/clj" "src/cljc"]
:test-paths ["spec/clj" "test/clj"]
:resource-paths ["resources" "target/cljsbuild"]

:minify-assets {:assets {"resources/public/css/site.min.css" "resources/public/css/site.css"}}

:cljsbuild {:builds {:min {:source-paths ["src/cljs" "src/cljc" "env/prod/cljs"]
:compiler {:output-to "target/cljsbuild/public/js/app.js"
:output-dir "target/cljsbuild/public/js"
:source-map "target/cljsbuild/public/js/app.js.map"
:optimizations :advanced
:pretty-print false}}
:app {:source-paths ["src/cljs" "src/cljc" "env/dev/cljs"]
:figwheel {:on-jsload "tales.core/mount-root"}
:compiler {:main "tales.dev"
:asset-path "/js/out"
:output-to "target/cljsbuild/public/js/app.js"
:output-dir "target/cljsbuild/public/js/out"
:source-map true
:optimizations :none
:pretty-print true
:closure-defines {"re_frame.trace.trace_enabled_QMARK_" true}
:preloads [day8.re-frame-10x.preload]}}
:test {:source-paths ["src/cljs" "src/cljc" "test/cljs"]
:compiler {:main tales.doo-runner
:asset-path "/js/out"
:output-to "target/test.js"
:output-dir "target/cljstest/public/js/out"
:optimizations :none
:pretty-print true}}
:devcards {:source-paths ["src/cljs" "src/cljc" "env/dev/cljs"]
:figwheel {:devcards true}
:compiler {:main "tales.cards"
:asset-path "js/devcards_out"
:output-to "target/cljsbuild/public/js/app_devcards.js"
:output-dir "target/cljsbuild/public/js/devcards_out"
:source-map-timestamp true
:optimizations :none
:pretty-print true}}}}
:resource-paths ["resources"]

:doo {:build "test"
:alias {:default [:chrome]}}

:figwheel {:http-server-root "public"
:server-logfile false
:server-port 3449
:nrepl-port 7002
:nrepl-middleware ["cemerick.piggieback/wrap-cljs-repl"]
:css-dirs ["resources/public/css"]
:ring-handler tales.handler/app}



:profiles {:dev {:repl-options {:init-ns tales.repl
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]}
:dependencies [[binaryage/devtools "0.9.10"]
[ring/ring-mock "0.3.2"]
[ring/ring-devel "1.7.0"]
[prone "1.6.1"]
[figwheel-sidecar "0.5.17"]
[org.clojure/tools.nrepl "0.2.13"]
[com.cemerick/piggieback "0.2.2"]
[speclj "3.3.2"]
[devcards "0.2.6" :exclusions [cljsjs/react]]
[pjstadig/humane-test-output "0.8.3"]
[day8.re-frame/re-frame-10x "0.3.3"]]
:source-paths ["env/dev/clj"]
:plugins [[lein-figwheel "0.5.17"]
[lein-doo "0.1.10"]]
:injections [(require 'pjstadig.humane-test-output)
(pjstadig.humane-test-output/activate!)]
:env {:dev true}}
:uberjar {:source-paths ["env/prod/clj"]
:prep-tasks ["compile" ["cljsbuild" "once" "min"]]
:profiles {:uberjar {:source-paths ["env/prod/clj"]
:prep-tasks ["compile"]
:env {:production true}
:aot :all
:omit-source true}})
139 changes: 0 additions & 139 deletions resources/public/css/site.css

This file was deleted.

1 change: 0 additions & 1 deletion resources/public/css/site.min.css

This file was deleted.

2 changes: 0 additions & 2 deletions src/clj/tales/handler.clj
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@
(wrap-web-middleware
(routes
(GET "/" [] (web/loading-page))
(GET "/v2" [] (web/loading-page-v2))
(context "/editor/:slug" [slug]
(GET "/" [] (web/loading-page))
(files "/" {:root (str (fs/file *project-dir* slug))}))
(context "/presenter/:slug" [slug]
(GET "/" [] (web/loading-page))
(files "/" {:root (str (fs/file *project-dir* slug))}))
(GET "/cards" [] (web/cards-page))
(resources "/")
(not-found "Not Found"))))

Expand Down
26 changes: 0 additions & 26 deletions src/clj/tales/web.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,7 @@
(:require [config.core :refer [env]]
[hiccup.page :refer [include-js include-css html5]]))

(defn head []
[:head
[:meta {:charset "utf-8"}]
[:meta {:name "viewport"
:content "width=device-width, initial-scale=1"}]
(include-css "/vendor/normalize/normalize.css")
(include-css (if (env :dev) "/css/site.css" "/css/site.min.css"))])

(defn assets []
(include-js "/js/app.js"))

(defn loading-page []
(html5
(head)
[:body {:class "body-container"}
[:div#app
[:p "Please wait..."]]
(assets)]))

(defn loading-page-v2 []
(html5
[:head
[:meta {:charset "utf-8"}]
Expand All @@ -33,10 +14,3 @@
[:div#app]
(include-js "/js/tales.js")
[:script "tales.init();"]]))

(defn cards-page []
(html5
(head)
[:body
[:div#app]
(include-js "/js/app_devcards.js")]))
Loading

0 comments on commit 4943a2d

Please sign in to comment.