Skip to content

Commit

Permalink
Remove this-as, prepare for portal viewer (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
sritchie committed Jun 9, 2023
1 parent 83ce94f commit 5e58af1
Show file tree
Hide file tree
Showing 10 changed files with 668 additions and 600 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,28 @@ jobs:
steps:
- uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/deps.edn') }}
restore-keys: ${{ runner.os }}-m2
path: |
.cpcache
.shadow-cljs
~/.m2
key: "1"

- name: Checkout
uses: actions/checkout@v3

- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@4.0
uses: DeLaGuardo/setup-clojure@master
with:
cli: latest
bb: latest
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install babashka
uses: just-sultanov/setup-babashka@v2
with:
version: '0.8.156'

- name: Build static site
run: bb build-static

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public/build
11 changes: 7 additions & 4 deletions .github/workflows/kondo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: Install babashka
uses: just-sultanov/setup-babashka@v2
- name: Install Babashka
uses: DeLaGuardo/setup-clojure@10.2
with:
version: '0.8.156'
bb: latest

- name: Cache kondo directory
uses: actions/cache@v2
Expand All @@ -24,5 +24,8 @@ jobs:
key: ${{ runner.os }}-kondo
restore-keys: ${{ runner.os }}-kondo

- name: Run clj-kondo
- name: Lint dependencies
run: bb lint-deps

- name: Lint project files
run: bb lint --config '{:output {:pattern "::{{level}} file={{filename}},line={{row}},col={{col}}::{{message}}"}}'
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

## [unreleased]

## [0.2.1]

- #34:

- removes SCI-incompatible code from `jsxgraph.core` to allow JSXGraph.cljs
use from Portal.

- upgrades pieces of the local build (Clerk, kondo etc)

## [0.2.0]

- #32:
Expand Down
21 changes: 15 additions & 6 deletions bb.edn
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{:deps {org.babashka/http-server {:mvn/version "0.1.11"}
org.babashka/cli {:mvn/version "0.2.23"}}
:pods {clj-kondo/clj-kondo {:version "2023.01.20"}}
org.babashka/cli {:mvn/version "0.2.23"}
io.github.clj-kondo/clj-kondo-bb
{:git/tag "v2023.01.20" :git/sha "adfc7df"}}
:tasks
{:requires ([babashka.cli :as cli]
[pod.borkdude.clj-kondo :as clj-kondo])
{:requires ([babashka.cli :as cli])
:init
(do (def cli-opts
(cli/parse-opts *command-line-args* {:coerce {:port :int}}))
Expand Down Expand Up @@ -51,7 +51,16 @@
{:doc "Release the library to Clojars."
:task (shell "clojure -T:build publish")}

lint-deps
{:requires ([clj-kondo.core :as kondo])
:doc "Lint dependencies."
:task (kondo/run!
{:lint [(with-out-str
(babashka.tasks/clojure
"-Spath -A:nextjournal/clerk"))]
:dependencies true})}

lint
{:doc "Lint the src and dev directories with clj-kondo."
:task (clj-kondo/print!
(clj-kondo/run! {:lint ["src" "dev"]}))}}}
:task (exec 'clj-kondo.core/exec)
:exec-args {:lint ["src" "dev"]}}}}
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
;; ## Variables

(def lib 'org.mentat/jsxgraph.cljs)
(def version "0.2.0")
(def version "0.2.1")
(def pom-deps
{'org.babashka/sci
{:mvn/version "0.6.37"
Expand Down
10 changes: 5 additions & 5 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{:paths ["src" "resources"]
:deps {reagent/reagent {:mvn/version "1.1.1"}}
:deps {reagent/reagent {:mvn/version "1.2.0"}}

:aliases
{:nextjournal/clerk
{:extra-paths ["dev"]
:extra-deps
{org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/clojurescript {:mvn/version "1.11.60"}
org.mentat/clerk-utils {:mvn/version "0.4.1"}
org.mentat/clerk-utils {:mvn/version "0.6.0"}

io.github.nextjournal/clerk
{:git/sha "fad499407d979916d21b33cc7e46e73f7a485e37"}
{:git/sha "1f6c5331418aaf9c5a4335fc2e6e95f07dc3af6b"}
io.github.nextjournal/clerk.render
{:git/url "https://github.com/nextjournal/clerk"
:git/sha "fad499407d979916d21b33cc7e46e73f7a485e37"
:git/sha "1f6c5331418aaf9c5a4335fc2e6e95f07dc3af6b"
:deps/root "render"}}
:exec-fn user/build!}

:build
{:deps {io.github.clojure/tools.build {:git/tag "v0.8.2" :git/sha "ba1a2bf"}
{:deps {io.github.clojure/tools.build {:git/tag "v0.9.4" :git/sha "76b78fe"}
slipset/deps-deploy {:mvn/version "0.2.0"}}
:ns-default build}}}
10 changes: 4 additions & 6 deletions dev/jsxgraph/notebook.clj
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
^#:nextjournal.clerk
{:toc true
:no-cache true
:visibility :hide-ns}
^{:nextjournal.clerk/visibility {:code :hide}}
(ns jsxgraph.notebook
#:nextjournal.clerk{:toc true :no-cache true}
(:require [mentat.clerk-utils.docs :as docs]
[mentat.clerk-utils.show :refer [show-sci]]
[nextjournal.clerk :as clerk]))

^{::clerk/visibility {:code :hide :result :hide}}
(clerk/eval-cljs
;; These aliases only apply inside this namespace.
'(require '[jsxgraph.core :as jsx])
'(require '[reagent.core :as reagent]))
'(do (require '[jsxgraph.core :as jsx])
(require '[reagent.core :as reagent])))

;; # JSXGraph.cljs
;;
Expand Down

0 comments on commit 5e58af1

Please sign in to comment.