-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from arttuka/develop
Frontin CLJS-rewrite
- Loading branch information
Showing
78 changed files
with
2,058 additions
and
9,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
mtg-pairings-server/env/dev/clj/mtg_pairings_server/middleware.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
(ns mtg-pairings-server.middleware | ||
(:require [ring.middleware.defaults :refer [site-defaults api-defaults wrap-defaults]] | ||
[prone.middleware :refer [wrap-exceptions]] | ||
[ring.middleware.reload :refer [wrap-reload]])) | ||
|
||
(defn wrap-api-middleware [handler] | ||
(-> handler | ||
(wrap-defaults api-defaults) | ||
wrap-exceptions | ||
wrap-reload)) | ||
|
||
(defn wrap-site-middleware [handler] | ||
(-> handler | ||
(wrap-defaults site-defaults) | ||
wrap-exceptions | ||
wrap-reload)) |
23 changes: 23 additions & 0 deletions
23
mtg-pairings-server/env/dev/clj/mtg_pairings_server/repl.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(ns mtg-pairings-server.repl | ||
(:require [mount.core :as m] | ||
[ring.middleware.file-info :refer :all] | ||
[ring.middleware.file :refer :all] | ||
[figwheel-sidecar.repl-api :refer :all] | ||
[mtg-pairings-server.handler :refer [app]] | ||
[mtg-pairings-server.server :refer [run-server!]] | ||
[mtg-pairings-server.properties :refer [properties]])) | ||
|
||
(defn get-handler [] | ||
;; #'app expands to (var app) so that when we reload our code, | ||
;; the server is forced to re-resolve the symbol in the var | ||
;; rather than having its own copy. When the root binding | ||
;; changes, the server picks it up without having to restart. | ||
(-> #'app | ||
; Makes static assets in $PROJECT_DIR/resources/public/ available. | ||
(wrap-file "resources") | ||
; Content-Type, Content-Length, and Last Modified headers for files in body | ||
(wrap-file-info))) | ||
|
||
(m/defstate server | ||
:start (run-server! (get-handler) (:server properties)) | ||
:stop (.stop server)) |
11 changes: 11 additions & 0 deletions
11
mtg-pairings-server/env/dev/cljs/mtg_pairings_server/dev.cljs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
(ns ^:figwheel-no-load mtg-pairings-server.dev | ||
(:require | ||
[mount.core :as m] | ||
[mtg-pairings-server.core :as core] | ||
[devtools.core :as devtools])) | ||
|
||
(devtools/install!) | ||
|
||
(enable-console-print!) | ||
|
||
(m/start) |
22 changes: 22 additions & 0 deletions
22
mtg-pairings-server/env/prod/clj/mtg_pairings_server/main.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(ns mtg-pairings-server.main | ||
(:gen-class) | ||
(:require [mount.core :as m] | ||
[taoensso.timbre :as timbre] | ||
[taoensso.timbre.appenders.3rd-party.rolling :refer [rolling-appender]] | ||
[mtg-pairings-server.server :refer [run-server!]] | ||
[mtg-pairings-server.properties :refer [properties]] | ||
mtg-pairings-server.handler)) | ||
|
||
(def timbre-config {:level :info | ||
:appenders {:rolling (rolling-appender {:path "./logs/pairings.log" :pattern :daily}) | ||
:println nil}}) | ||
|
||
(m/defstate server | ||
:start (do | ||
(timbre/merge-config! timbre-config) | ||
(run-server! mtg-pairings-server.handler/app (:server properties))) | ||
:stop (server)) | ||
|
||
(defn -main [] | ||
(timbre/info "Starting mtg-pairings...") | ||
(m/start)) |
8 changes: 8 additions & 0 deletions
8
mtg-pairings-server/env/prod/clj/mtg_pairings_server/middleware.clj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(ns mtg-pairings-server.middleware | ||
(:require [ring.middleware.defaults :refer [site-defaults api-defaults wrap-defaults]])) | ||
|
||
(defn wrap-api-middleware [handler] | ||
(wrap-defaults handler api-defaults)) | ||
|
||
(defn wrap-site-middleware [handler] | ||
(wrap-defaults handler site-defaults)) |
8 changes: 8 additions & 0 deletions
8
mtg-pairings-server/env/prod/cljs/mtg_pairings_server/prod.cljs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(ns mtg-pairings-server.prod | ||
(:require [mtg-pairings-server.core :as core] | ||
[mount.core :as m])) | ||
|
||
;;ignore println statements in prod | ||
(set! *print-fn* (fn [& _])) | ||
|
||
(m/start) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,116 @@ | ||
(defproject mtg-pairings-server "1.1.0" | ||
(defproject mtg-pairings-server "2.0.0" | ||
:license {:name "MIT License" | ||
:url "http://www.opensource.org/licenses/mit-license.php"} | ||
:url "http://www.opensource.org/licenses/mit-license.php"} | ||
:dependencies [[org.clojure/clojure "1.8.0"] | ||
[org.clojure/core.async "0.3.443"] | ||
[reagent "0.7.0" :exclusions [cljsjs/react]] | ||
[reagent-utils "0.2.1"] | ||
[ring "1.6.2"] | ||
[ring/ring-defaults "0.3.1"] | ||
[compojure "1.6.0"] | ||
[hiccup "1.0.5"] | ||
[yogthos/config "0.9"] | ||
[org.clojure/clojurescript "1.9.908" | ||
:scope "provided"] | ||
[secretary "1.2.3"] | ||
[venantius/accountant "0.2.0" | ||
:exclusions [org.clojure/tools.reader]] | ||
[org.clojure/core.cache "0.6.5"] | ||
[ring "1.2.1"] | ||
[ring/ring-core "1.4.0"] | ||
[http-kit "2.1.18"] | ||
[org.clojure/tools.reader "1.0.0-beta1"] | ||
[clj-time "0.11.0"] | ||
[korma "0.4.2"] | ||
[org.postgresql/postgresql "9.4.1208"] | ||
[org.clojure/tools.logging "0.3.1"] | ||
[ch.qos.logback/logback-classic "1.1.5"] | ||
[metosin/compojure-api "1.0.0"] | ||
[ring.middleware.jsonp "0.1.6"]] | ||
:profiles {:dev {:source-paths ["dev"] | ||
:dependencies [[org.clojure/tools.namespace "0.2.11"]]} | ||
:uberjar {:main mtg-pairings-server.server | ||
:aot [mtg-pairings-server.server]}}) | ||
[http-kit "2.2.0"] | ||
[org.clojure/tools.reader "1.0.5"] | ||
[clj-time "0.14.0"] | ||
[com.andrewmcveigh/cljs-time "0.5.0"] | ||
[korma "0.4.3"] | ||
[mount "0.1.11"] | ||
[org.postgresql/postgresql "42.1.4"] | ||
[org.clojure/tools.logging "0.4.0"] | ||
[metosin/compojure-api "1.1.11"] | ||
[ring.middleware.jsonp "0.1.6"] | ||
[com.taoensso/sente "1.11.0" :exclusions [com.taoensso/encore]] | ||
[com.taoensso/timbre "4.10.0"] | ||
[com.cognitect/transit-clj "0.8.300"] | ||
[com.cognitect/transit-cljs "0.8.239"] | ||
[re-frame "0.10.1" :exclusions [cljsjs/react]] | ||
[cljsjs/react-with-addons "15.6.1-0"]] | ||
:plugins [[lein-environ "1.1.0" :exclusions [org.clojure/clojure]] | ||
[lein-cljsbuild "1.1.7"] | ||
[lein-asset-minifier "0.3.2"]] | ||
|
||
:uberjar-name "mtg-pairings.jar" | ||
|
||
:clean-targets ^{:protect false} [:target-path | ||
[:cljsbuild :builds :app :compiler :output-dir] | ||
[:cljsbuild :builds :app :compiler :output-to]] | ||
|
||
:source-paths ["src/clj" "src/cljc"] | ||
:resource-paths ["resources" "target/cljsbuild"] | ||
|
||
:minify-assets {:assets {"resources/public/css/main.min.css" | ||
["resources/public/css/main.css" | ||
"resources/public/css/bootstrap.css" | ||
"resources/public/css/bootstrap-theme.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 "mtg-pairings-server.core/mount-root"} | ||
:compiler | ||
{:main "mtg-pairings-server.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}} | ||
#_#_ | ||
:test | ||
{:source-paths ["src/cljs" "src/cljc" "test/cljs"] | ||
:compiler {:main mtg-pairings-server.doo-runner | ||
:asset-path "/js/out" | ||
:output-to "target/test.js" | ||
:output-dir "target/cljstest/public/js/out" | ||
:optimizations :whitespace | ||
:pretty-print true}}}} | ||
|
||
:figwheel {:http-server-root "public" | ||
:server-port 3449 | ||
:nrepl-port 7002 | ||
:nrepl-middleware ["cemerick.piggieback/wrap-cljs-repl" | ||
] | ||
:css-dirs ["resources/public/css"] | ||
:ring-handler mtg-pairings-server.handler/app} | ||
|
||
:profiles {:dev {:repl-options {:init-ns mtg-pairings-server.repl | ||
:nrepl-middleware [cemerick.piggieback/wrap-cljs-repl]} | ||
:source-paths ["dev" "env/dev/clj"] | ||
:plugins [[lein-figwheel "0.5.13"] | ||
[lein-doo "0.1.6"]] | ||
|
||
:injections [(require 'pjstadig.humane-test-output) | ||
(pjstadig.humane-test-output/activate!)] | ||
|
||
:env {:dev true} | ||
:dependencies [[org.clojure/tools.namespace "0.2.11"] | ||
[binaryage/devtools "0.9.4"] | ||
[ring/ring-mock "0.3.1"] | ||
[ring/ring-devel "1.6.2"] | ||
[prone "1.1.4"] | ||
[figwheel-sidecar "0.5.13"] | ||
[org.clojure/tools.nrepl "0.2.13"] | ||
[com.cemerick/piggieback "0.2.2"] | ||
[pjstadig/humane-test-output "0.8.2"]]} | ||
:uberjar {:main mtg-pairings-server.main | ||
:aot :all | ||
:hooks [minify-assets.plugin/hooks] | ||
:source-paths ["env/prod/clj"] | ||
:prep-tasks ["compile" ["cljsbuild" "once" "min"]] | ||
:env {:production true} | ||
:omit-source true}}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-163 Bytes
(99%)
mtg-pairings-server/resources/public/fonts/glyphicons-halflings-regular.eot
Binary file not shown.
Oops, something went wrong.