Skip to content

Commit

Permalink
css tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
awb99 committed Apr 17, 2024
1 parent 25d1060 commit d47b5a8
Show file tree
Hide file tree
Showing 12 changed files with 90 additions and 97 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,10 @@ jobs:
if: ${{ matrix.os != 'windows-latest' }}
run: clojure -M:cljfmt
shell: bash
- name: show git tag
run: clojure -M:garamond
- name: npm-install (css resources)
run: |
clojure -X:goldly:build :profile "npm-install"
clojure -X:webly:npm-install"
./scripts/copy_res.sh
#- name: clj-kondo
# run: clojure -M:lint
#- name: test-clj
# run: clojure -M:test-clj
#- name: cloverage
# run: clojure -M:cloverage
- name: Release
if: success()
# if: github.event_name == 'push'
Expand All @@ -51,12 +43,5 @@ jobs:
run: |
git config --global user.email "ci@pinkgorilla.org"
git config --global user.name "CI/CD"
rm src/goldly_bindings_generated.cljs
clojure -M:release --patch
git push --tags
# clojure -M:release tag --minor
# clojure -M:release pom
# clojure -M:release jar
# clojure -M:release deploy
# lein release
# bash <(curl -s https://codecov.io/bash)
clojure -T:build jar
clojure -T:build deploy
22 changes: 0 additions & 22 deletions .github/workflows/pr.yml

This file was deleted.

50 changes: 50 additions & 0 deletions build.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
(ns build
(:require
[clojure.tools.build.api :as b]
[deps-deploy.deps-deploy :as dd]))

(def lib 'org.pinkgorilla/ui-highlightjs)
(def version (format "0.1.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version))

(defn clean [_]
(b/delete {:path "target"}))

(def pom-template
[[:licenses
[:license
[:name "Eclipse Public License"]
[:url "https://www.eclipse.org/legal/epl-v10.html"]]]
[:developers
[:developer
[:name "pink-gorilla"]]]
[:scm
[:url "https://github.com/pink-gorilla/ui-highlightjs/"]
[:connection "scm:git:git://github.com/pink-gorilla/ui-highlightjs.git"]
[:developerConnection "scm:git:ssh://git@github.com/pink-gorilla/ui-highlightjs.git"]]])

(def opts {:class-dir class-dir
:lib lib
:version version
:basis basis
:pom-data pom-template
:src-dirs ["src"]})

(defn jar [_]
(println "Building jar ..")
(b/write-pom opts)
(b/copy-dir {:src-dirs ["src"
"resources"]
:target-dir class-dir})
(b/jar {:class-dir class-dir
:jar-file jar-file}))

(defn deploy "Deploy the JAR to Clojars." [_]
(println "Deploying to Clojars ..")
(dd/deploy {:installer :remote
;:sign-releases? true
:pom-file (b/pom-path (select-keys opts [:lib :class-dir]))
;:artifact "target/tech.ml.dataset.jar"
:artifact (b/resolve-path jar-file)}))
64 changes: 27 additions & 37 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{:paths ["src"
"resources" ; goldly-ext
"resources" ; ext
"target/node_modules" ; npm module css
]
:deps
{org.clojure/clojure {:mvn/version "1.10.3"}}
:aliases
{;https://github.com/applied-science/deps-library
:release
{:extra-deps {applied-science/deps-library {:mvn/version "0.4.0"}}
:main-opts ["-m" "applied-science.deps-library"]}
{;github ci
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.9.6"}
slipset/deps-deploy {:mvn/version "0.2.1"}
babashka/fs {:mvn/version "0.0.5"}}
:ns-default build}

; https://github.com/weavejester/cljfmt
:cljfmt
Expand All @@ -23,38 +24,27 @@
{:extra-deps {clj-kondo/clj-kondo {:mvn/version "RELEASE"}}
:main-opts ["-m" "clj-kondo.main" "--lint" "src"]}

:outdated
{:extra-deps {com.github.liquidz/antq {:mvn/version "RELEASE"}}
:main-opts ["-m" "antq.core"]}

:check
{:extra-deps {athos/clj-check {:git/url "https://github.com/athos/clj-check.git"
:sha "0ca84df1357d71429243b99908303f45a934654c"}}
:main-opts ["-m" "clj-check.check"]}

:garamond
{:extra-deps {com.workframe/garamond {:mvn/version "0.4.0"}}
:main-opts ["-m" "garamond.main"]}

:goldly
{:extra-paths ["target/webly" ; to include the sci-bindings info
"node_modules"
"demo"]
:extra-deps {org.pinkgorilla/goldly-docs {:mvn/version "0.4.545"
:exclusions [org.pinkgorilla/ui-highlightjs]}
;org.pinkgorilla/ui-repl {:mvn/version "0.0.43"} ; reagent atoms in cljs
}
:exec-fn modular.system/start!
:exec-args {:profile "jetty"
:services "goldly/services.edn"
:config ["webly/config.edn" "goldly/config.edn" "goldly/docs-config.edn"]}}

:build
{:exec-fn goldly.app.build/goldly-build
:exec-args {:profile "npm-install"}}



; ci

:webly {:extra-deps {org.pinkgorilla/webly {:mvn/version "0.5.671"}
org.pinkgorilla/ui-repl {:mvn/version "0.1.104"}}
:exec-fn webly.app.app/webly-build
:exec-args {:config [{:build {:disabled-extensions #{; extensions using sci-configs will not work in webly.
"reagent" "re-frame"
"funcool-promesa"
"applied-science.js-interop"
; webly2 is now in webly. needs to be removed from ui-repl.
"webly2"
"ui-repl"
"cljs-ajax"}}}]
:profile "npm-install"}}

:npm-install {:exec-args {:profile "npm-install"}}
:compile {:exec-args {:profile "compile2"}}
:release {:exec-args {:profile "release"}}
:release-adv {:exec-args {:profile "release-adv"}}
:static {:exec-args {:profile "static"}}
:ci {:exec-args {:profile "ci"}}



Expand Down
4 changes: 0 additions & 4 deletions release.edn

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@
[:div.bg-blue-500 ; test how background is on different color
[:p "this snippet demonstrates to use highlight.js"]
['ui.highlightjs/highlightjs "(+ 8 8)\n(def add [a b] \n (+ a b))\n(add)"]
[:p "live goes on!"]]


^:R
[:div.bg-blue-500 ; test how background is on different color
[:p "look at --> "]
['ui.highlightjs/highlightjs "(->> (map inc (range 10))\n (take 3))"]
[:p "live goes on!"]]
2 changes: 1 addition & 1 deletion resources/ext/highlightjs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
; theme
:theme
{:available
{:highlightjs {true ["gorilla-code.css"]
{:highlightjs {true ["highlight.js/gorilla-code.css"]
"rainbow" ["highlight.js/styles/rainbow.css"]
"grayscale" ["highlight.js/styles/grayscale.css"]
"brown-paper" ["highlight.js/styles/brown-paper.css"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pre code.hljs {
font-family: FiraCodeRegular, Consolas, "courier new" !important; /* #Fira Code,Consolas,courier new; */
color: black !important;
background-color: #afcbe4 !important;
width: 100%;
padding: 2px;
font-size: small;
}
Expand Down
File renamed without changes.
5 changes: 0 additions & 5 deletions scripts/compile_adv_run.sh

This file was deleted.

5 changes: 0 additions & 5 deletions scripts/compile_run.sh

This file was deleted.

6 changes: 1 addition & 5 deletions src/deps.cljs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{:npm-deps
{; in projects that use notebook-ui
; shadow-cljs creates package.json
; based on this dependencies

"highlight.js" "^11.0.1" ; code-coloring ; also used by 10x
{"highlight.js" "^11.0.1" ; code-coloring ; also used by 10x
;"highlightjs-line-numbers.js" "^2.8.0"
; see: https://github.com/wcoder/highlightjs-line-numbers.js/issues/77s

Expand Down

0 comments on commit d47b5a8

Please sign in to comment.