Skip to content

Commit

Permalink
refactoring ns; alpha release
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Jul 4, 2020
1 parent 96ac441 commit 2c86519
Show file tree
Hide file tree
Showing 16 changed files with 1,469 additions and 1,436 deletions.
2,779 changes: 1,404 additions & 1,375 deletions calcit.cirru

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"license": "MIT",
"devDependencies": {
"http-server": "^0.12.3",
"shadow-cljs": "^2.10.13"
"shadow-cljs": "^2.10.14"
}
}
2 changes: 1 addition & 1 deletion release.edn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{:version "0.6.0-a2"
{:version "0.6.1-a1"
:group-id "cumulo"
:artifact-id "recollect"
:skip-tag true
Expand Down
16 changes: 8 additions & 8 deletions shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
:cache-blockers #{cumulo-util.build}
:dependencies [
[mvc-works/hsl "0.1.2"]
[mvc-works/shell-page "0.1.13"]
[mvc-works/shell-page "0.1.14"]
[respo "0.12.3"]
[respo/ui "0.3.15-a1"]
[respo/ui "0.3.15"]
[cumulo/util "0.1.12"]
[cumulo/caches "0.0.1"]
[respo/value "0.3.0"]
Expand All @@ -20,9 +20,9 @@
:client {
:target :browser, :output-dir "target/", :asset-path "."
:modules {
:client {:init-fn recollect.main/main!}
:client {:init-fn recollect.app.main/main!}
}
:devtools {:after-load recollect.main/reload!}
:devtools {:after-load recollect.app.main/reload!}
:compiler-options {:infer-externs :auto}
:release {
:output-dir "dist/", :module-hash-names 8
Expand All @@ -34,12 +34,12 @@
:devtools {:after-load recollect.test/main!}
}
:page {
:target :node-script, :output-to "target/page.js", :main recollect.page/main!
:devtools {:after-load recollect.page/main!}
:target :node-script, :output-to "target/page.js", :main recollect.app.page/main!
:devtools {:after-load recollect.app.page/main!}
}
:upload {
:target :node-script, :output-to "target/upload.js", :main recollect.upload/main!
:devtools {:after-load recollect.upload/main!}
:target :node-script, :output-to "target/upload.js", :main recollect.app.upload/main!
:devtools {:after-load recollect.app.upload/main!}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

(ns recollect.comp.container
(ns recollect.app.comp.container
(:require [hsl.core :refer [hsl]]
[respo-ui.core :as ui]
[respo.core :refer [defcomp >> <> span div]]
[respo.comp.space :refer [=<]]
[recollect.comp.panel :refer [comp-panel]]
[recollect.app.comp.panel :refer [comp-panel]]
[respo-value.comp.value :refer [comp-value]]))

(defcomp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

(ns recollect.comp.panel
(ns recollect.app.comp.panel
(:require [hsl.core :refer [hsl]]
[respo-ui.core :as ui]
[respo.core :refer [defcomp <> span div]]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

(ns recollect.config )
(ns recollect.app.config )

(def cdn?
(cond
Expand Down
10 changes: 5 additions & 5 deletions src/recollect/main.cljs → src/recollect/app/main.cljs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@

(ns recollect.main
(ns recollect.app.main
(:require [respo.core :refer [render! clear-cache! realize-ssr!]]
[recollect.comp.container :refer [comp-container]]
[recollect.app.comp.container :refer [comp-container]]
[cljs.reader :refer [read-string]]
[recollect.twig.container :refer [twig-container]]
[recollect.app.twig.container :refer [twig-container]]
[recollect.diff :refer [diff-twig]]
[recollect.patch :refer [patch-twig]]
[recollect.updater :refer [updater]]
[recollect.app.updater :refer [updater]]
[recollect.schema :as schema]
[recollect.config :as config]
[recollect.app.config :as config]
[recollect.twig :refer [clear-twig-caches!]]))

(defonce *client-store (atom schema/store))
Expand Down
14 changes: 9 additions & 5 deletions src/recollect/page.cljs → src/recollect/app/page.cljs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

(ns recollect.page
(ns recollect.app.page
(:require [respo.render.html :refer [make-string]]
[shell-page.core :refer [make-page spit slurp]]
[recollect.comp.container :refer [comp-container]]
[recollect.app.comp.container :refer [comp-container]]
[recollect.schema :as schema]
[cljs.reader :refer [read-string]]
[recollect.config :as config]
[recollect.app.config :as config]
[cumulo-util.build :refer [get-ip!]])
(:require-macros [clojure.core.strint :refer [<<]]))

Expand All @@ -18,7 +18,7 @@
(merge
base-info
{:styles [(<< "http://~(get-ip!):8100/main.css") "/entry/main.css"],
:scripts [{:src "/client.js", :defer? true}],
:scripts [{:src "/client.js", :type :script, :defer? true}],
:inline-styles []})))

(defn prod-page []
Expand All @@ -31,7 +31,11 @@
(merge
base-info
{:styles [(:release-ui config/site)],
:scripts (map (fn [x] {:src (-> x :output-name prefix-cdn), :defer? true}) assets),
:scripts (->> assets
(map
(fn [x]
{:type :script, :src (-> x :output-name prefix-cdn), :defer? true}))
vec),
:ssr "respo-ssr",
:inline-styles [(slurp "./entry/main.css")]}))))

Expand Down
4 changes: 4 additions & 0 deletions src/recollect/app/twig/card.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

(ns recollect.app.twig.card (:require [recollect.twig :refer [deftwig]]))

(deftwig twig-card (user date) {:user user, :date date})
8 changes: 8 additions & 0 deletions src/recollect/app/twig/container.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

(ns recollect.app.twig.container
(:require [recollect.app.twig.card :refer [twig-card]] [recollect.twig :refer [deftwig]]))

(deftwig
twig-container
(store)
(merge store {:card (twig-card (:user store) (:date store))}))
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

(ns recollect.updater (:require [respo.cursor :refer [update-states]]))
(ns recollect.app.updater (:require [respo.cursor :refer [update-states]]))

(defn updater [store op op-data]
(case op
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

(ns recollect.upload
(ns recollect.app.upload
(:require ["child_process" :as cp]
[recollect.config :as config]
[cumulo-util.file :refer [sh!]])
Expand Down
4 changes: 0 additions & 4 deletions src/recollect/twig/card.cljs

This file was deleted.

8 changes: 0 additions & 8 deletions src/recollect/twig/container.cljs

This file was deleted.

46 changes: 23 additions & 23 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2c86519

Please sign in to comment.