Skip to content

Commit

Permalink
upgrade coworkflow; update respo 0.7.x; bump 0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tiye committed Oct 28, 2017
1 parent a2a913b commit 56b0b05
Show file tree
Hide file tree
Showing 6 changed files with 709 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Shell Page (generator)
### Usage

```edn
[mvc-works/shell-page "0.1.4"]
[mvc-works/shell-page "0.1.5"]
```

```clojure
Expand Down
22 changes: 10 additions & 12 deletions build.boot
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@

(defn read-password [guide]
(String/valueOf (.readPassword (System/console) guide nil)))

(set-env!
:resource-paths #{"src"}
:dependencies '[[respo "0.5.2"]])
:dependencies '[[respo "0.7.0-a1"]]
:repositories #(conj % ["clojars" {:url "https://clojars.org/repo/"
:username "jiyinyiyong"
:password (read-password "Clojars password: ")}]))

(def +version+ "0.1.4")
(def +version+ "0.1.5")

(deftask build []
(deftask deploy []
(comp
(pom :project 'mvc-works/shell-page
:version +version+
Expand All @@ -14,12 +20,4 @@
:scm {:url "https://github.com/mvc-works/shell-page"}
:license {"MIT" "http://opensource.org/licenses/mit-license.php"})
(jar)
(install)
(target)))

(deftask deploy []
(set-env!
:repositories #(conj % ["clojars" {:url "https://clojars.org/repo/"}]))
(comp
(build)
(push :repo "clojars" :gpg-sign (not (.endsWith +version+ "-SNAPSHOT")))))
(push :repo "clojars" :gpg-sign false)))
2 changes: 1 addition & 1 deletion coir.edn

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion shadow-cljs.edn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

{:source-paths ["src/"]
:dependencies [[respo "0.6.6"]]
:dependencies [[respo "0.7.0-a1"]]
:builds {:render {:target :node-script
:output-to "target/main.js"
:main shell-page.main/main!
Expand Down
9 changes: 5 additions & 4 deletions src/shell_page/core.cljs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

(ns shell-page.core
(:require-macros (respo.macros :refer [html <> head title script style meta' div link body]))
(:require [respo.core :refer [create-element]]
(:require (respo.macros :refer [html <> head title script style meta' div link body list->])
[respo.render.html :refer [make-string]]
["fs" :as fs]))

Expand All @@ -21,14 +20,16 @@
(if (some? (:ssr resources)) (meta' {:class (:ssr resources)})))
(body
{}
(div
(list->
:div
{}
(->> (:styles resources)
(map-indexed
(fn [idx path] [idx (link {:rel "stylesheet", :type "text/css", :href path})]))))
(div {:class-name "app", :innerHTML html-content})
(if (some? (:inline-html resources)) (div {:innerHTML (:inline-html resources)}))
(div
(list->
:div
{}
(->> (:scripts resources) (map-indexed (fn [idx path] [idx (script {:src path})]))))
(if (some? (:append-html resources)) (div {:innerHTML (:append-html resources)}))))))
Expand Down
Loading

0 comments on commit 56b0b05

Please sign in to comment.