Skip to content

Instantly share code, notes, and snippets.

@usametov
Created January 30, 2023 16:26
Show Gist options
  • Save usametov/07e649a0eaa468d52f4bfd0eb5a0c440 to your computer and use it in GitHub Desktop.
Save usametov/07e649a0eaa468d52f4bfd0eb5a0c440 to your computer and use it in GitHub Desktop.
clj-playground
(ns astanova.clj-playground
(:require [clojure.tools.deps.alpha.repl :refer [add-libs]]))
(comment
;; alternatevly, we can require add-libs in comment
;; (require '[clojure.tools.deps.alpha.repl :refer [add-libs]])
(add-libs '{hiccup/hiccup {:mvn/version "2.0.0-alpha2"}})
(require '[hiccup.core :as hiccup])
(hiccup/html [:div {:class "right-aligned"}])
)
{:paths ["src" "resources"]
:deps {org.clojure/clojure {:mvn/version "1.11.1"}}
:aliases
{:run-m {:main-opts ["-m" "astanova.clj-playground"]}
:run-x {:ns-default astanova.clj-playground
:exec-fn greet
:exec-args {:name "Clojure"}}
:build {:deps {io.github.seancorfield/build-clj
{:git/tag "v0.8.2" :git/sha "0ffdb4c"
;; since we're building an app uberjar, we do not
;; need deps-deploy for clojars.org deployment:
:deps/root "slim"}}
:ns-default build}
:test {:extra-paths ["test"]
:extra-deps {org.clojure/test.check {:mvn/version "1.1.1"}
io.github.cognitect-labs/test-runner
{:git/tag "v0.5.0" :git/sha "48c3c67"}}}
;; alpha state software as API has not been finalized however the code works reliably
;; Latest commit on add-lib3 branch, don't update with :search/outdated
;; Set logging implementation to no-operation
:lib/hotload {:extra-deps {org.clojure/tools.deps.alpha
{:git/url "https://github.com/clojure/tools.deps.alpha"
:git/sha "e4fb92eef724fa39e29b39cc2b1a850567d490dd"}
org.slf4j/slf4j-nop {:mvn/version "2.0.5"}}}
;; Refresh the current namespace in a running REPL
:lib/tools-ns {:extra-deps {org.clojure/tools.namespace {:mvn/version "1.3.0"}}}
;; Combination of hotload and tools-ns
:lib/reloaded {:extra-deps {org.clojure/tools.namespace {:mvn/version "1.3.0"}
org.clojure/tools.deps.alpha
{:git/url "https://github.com/clojure/tools.deps.alpha"
:git/sha "e4fb92eef724fa39e29b39cc2b1a850567d490dd"}
org.slf4j/slf4j-nop {:mvn/version "2.0.5"}}}
:alpha/hotload-libs {:extra-deps {org.clojure/tools.deps.alpha
{:git/url "https://github.com/clojure/tools.deps.alpha"
:sha "d77476f3d5f624249462e275ae62d26da89f320b"}}}
:repl/conjure {:extra-deps {nrepl/nrepl {:mvn/version "0.9.0"}
cider/cider-nrepl {:mvn/version "0.28.4"}}
:main-opts ["-m" "nrepl.cmdline"
"--middleware" "[cider.nrepl/cider-middleware]"
"--interactive"]}
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment