From 9e62b3e4f1e8145e383339496dfb117a08e1b517 Mon Sep 17 00:00:00 2001 From: ChenYong Date: Thu, 13 Dec 2018 19:45:08 +0800 Subject: [PATCH] make :manifest optional; bump 0.1.10 --- .gitignore | 1 + README.md | 1 + calcit.edn | 57 +++++++++++++++++++++++++++++++--------- meyvn.edn | 2 +- package.json | 2 +- src/shell_page/core.cljs | 2 +- src/shell_page/main.cljs | 3 ++- yarn.lock | 8 +++--- 8 files changed, 55 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 6059a1a..fcb074d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /target .shadow-cljs/ .nrepl-port +.xml diff --git a/README.md b/README.md index fc5299b..baead82 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Shell Page (generator) :scripts ["main.js"] :inline-html "" :append-html "" + :app-manifest "manifest.json" :viewport "width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"}) (shell-page.core/make-page app-html configs) ; returns string of html diff --git a/calcit.edn b/calcit.edn index 6e0100b..3085011 100644 --- a/calcit.edn +++ b/calcit.edn @@ -186,25 +186,49 @@ } } "x" { - :type :expr, :id "H1sEoz6khsb", :by nil, :at 1506700563333 + :type :expr, :by "root", :at 1544701113892, :id "oduGBDgq0j" :data { - "T" {:type :leaf, :id "rk3EjfT1hob", :text "link", :by "root", :at 1506700563333} - "j" { - :type :expr, :id "rkTEjMakhs-", :by nil, :at 1506700563333 + "D" {:type :leaf, :by "root", :at 1544701145045, :text "when-let", :id "Gv7h5ELVd7"} + "L" { + :type :expr, :by "root", :at 1544701117127, :id "CWbExWZt4q" :data { - "T" {:type :leaf, :id "ByRNiGa1no-", :text "{}", :by "root", :at 1506700563333} - "j" { - :type :expr, :id "HyyrizTJnoW", :by nil, :at 1506700563333 + "T" { + :type :expr, :by "root", :at 1544701117274, :id "VUVMEbk2AQ" :data { - "T" {:type :leaf, :id "B1lBsM6khjW", :text ":rel", :by "root", :at 1506700563333} - "j" {:type :leaf, :id "SJ-HoG612jb", :text "\"manifest", :by "UI0sFmATo", :at 1535562361155} + "T" {:type :leaf, :by "root", :at 1544701275438, :text "manifest", :id "N2gpZ0aR29"} + "j" { + :type :expr, :by "root", :at 1544701158300, :id "zuMWsDUmv0" + :data { + "T" {:type :leaf, :by "root", :at 1544701272337, :text ":manifest", :id "l2ahw7x35U"} + "j" {:type :leaf, :by "root", :at 1544701158300, :text "resources", :id "aBdrScrKUX"} + } + } } } - "r" { - :type :expr, :id "ryfSofTk3oW", :by nil, :at 1506700563333 + } + } + "T" { + :type :expr, :id "H1sEoz6khsb", :by nil, :at 1506700563333 + :data { + "T" {:type :leaf, :id "rk3EjfT1hob", :text "link", :by "root", :at 1506700563333} + "j" { + :type :expr, :id "rkTEjMakhs-", :by nil, :at 1506700563333 :data { - "T" {:type :leaf, :id "Sk7HiG613jb", :text ":href", :by "root", :at 1506700563333} - "j" {:type :leaf, :id "Sy4HjMa1nob", :text "\"manifest.json", :by "UI0sFmATo", :at 1535562362777} + "T" {:type :leaf, :id "ByRNiGa1no-", :text "{}", :by "root", :at 1506700563333} + "j" { + :type :expr, :id "HyyrizTJnoW", :by nil, :at 1506700563333 + :data { + "T" {:type :leaf, :id "B1lBsM6khjW", :text ":rel", :by "root", :at 1506700563333} + "j" {:type :leaf, :id "SJ-HoG612jb", :text "\"manifest", :by "UI0sFmATo", :at 1535562361155} + } + } + "r" { + :type :expr, :id "ryfSofTk3oW", :by nil, :at 1506700563333 + :data { + "T" {:type :leaf, :id "Sk7HiG613jb", :text ":href", :by "root", :at 1506700563333} + "j" {:type :leaf, :id "Sy4HjMa1nob", :text "manifest", :by "root", :at 1544701277477} + } + } } } } @@ -870,6 +894,13 @@ "j" {:type :leaf, :text "|", :id "SkmP6k2o-", :by "root", :at 1506700648281} } } + "yr" { + :type :expr, :by "root", :at 1544701226299, :id "uiRz4NOsUT" + :data { + "T" {:type :leaf, :by "root", :at 1544701266640, :text ":manifest", :id "uiRz4NOsUTleaf"} + "j" {:type :leaf, :by "root", :at 1544701235675, :text "\"manifest.json", :id "m7kn9-QdjD"} + } + } } } } diff --git a/meyvn.edn b/meyvn.edn index a282e0e..d38d230 100644 --- a/meyvn.edn +++ b/meyvn.edn @@ -1,7 +1,7 @@ {:pom {:group-id "mvc-works", :artifact-id "shell-page", - :version "0.1.9", + :version "0.1.10", :name "Genetate index.html with Respo"} :packaging {:jar {:enabled true :remote-repository {:id "clojars" diff --git a/package.json b/package.json index 6248616..d651962 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "devDependencies": { "http-server": "^0.11.1", - "shadow-cljs": "^2.6.21" + "shadow-cljs": "^2.7.9" }, "dependencies": {} } diff --git a/src/shell_page/core.cljs b/src/shell_page/core.cljs index 3f325f5..e06a0f3 100644 --- a/src/shell_page/core.cljs +++ b/src/shell_page/core.cljs @@ -16,7 +16,7 @@ {} (<> title (:title resources) nil) (link {:rel "icon", :type "image/png", :href (:icon resources)}) - (link {:rel "manifest", :href "manifest.json"}) + (when-let [manifest (:manifest resources)] (link {:rel "manifest", :href manifest})) (meta' {:charset "utf8"}) (meta' {:name "viewport", diff --git a/src/shell_page/main.cljs b/src/shell_page/main.cljs index 899ba3b..6c5e70d 100644 --- a/src/shell_page/main.cljs +++ b/src/shell_page/main.cljs @@ -13,4 +13,5 @@ :inline-styles [".app{color:#aaa;}"], :scripts ["/main.js"], :inline-html "", - :append-html ""}))) + :append-html "", + :manifest "manifest.json"}))) diff --git a/yarn.lock b/yarn.lock index fd61622..0234056 100644 --- a/yarn.lock +++ b/yarn.lock @@ -618,10 +618,10 @@ shadow-cljs-jar@1.3.0: resolved "https://registry.yarnpkg.com/shadow-cljs-jar/-/shadow-cljs-jar-1.3.0.tgz#e25c4fa57c0b405096250884b164c112654a06a3" integrity sha512-KReNVgFVM2ZPPGCP8rsCPqtlee/+SwXyoeEqbAXBO7jlpoNnNee2x4fiRg/Pr/vXGEkV/Ez5l4qdNSU1Na+1Jg== -shadow-cljs@^2.6.21: - version "2.6.21" - resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.6.21.tgz#f93f2bda89cf2561c6ec1d59c902fe9831a1ed62" - integrity sha512-kBQ4caEXGhSLo0AkAo46hhf5y/Kifw1ZWvM4Vw7h5SxXDT4AZkOi0xrwGhqW5H+cxBk2ReNdqMERhvvBLNuz6A== +shadow-cljs@^2.7.9: + version "2.7.9" + resolved "https://registry.yarnpkg.com/shadow-cljs/-/shadow-cljs-2.7.9.tgz#389e712b2a4c66cb5fbefb7c655614bef0877d14" + integrity sha512-3g3dijT5ztwukidXDyhda6AaPrFge5j9b69SUOzXXqgVr6JDslcCOY/l0midF1c15uT9GDx/JoprRlkRhPWgaA== dependencies: mkdirp "^0.5.1" node-libs-browser "^2.0.0"