Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
3 contributors

Users who have contributed to this file

@seancorfield @DjebbZ @slipset
159 lines (151 sloc) 8.36 KB
;; see https://github.com/seancorfield/dot-clojure
{:mvn/repos {"sonatype" {:url "https://oss.sonatype.org/content/repositories/snapshots/"}}
:aliases
{;; pull in specific versions of Clojure:
:1.2 {:override-deps {org.clojure/clojure {:mvn/version "1.2.1"}}}
:1.3 {:override-deps {org.clojure/clojure {:mvn/version "1.3.0"}}}
:1.4 {:override-deps {org.clojure/clojure {:mvn/version "1.4.0"}}}
:1.5 {:override-deps {org.clojure/clojure {:mvn/version "1.5.1"}}}
:1.6 {:override-deps {org.clojure/clojure {:mvn/version "1.6.0"}}}
:1.7 {:override-deps {org.clojure/clojure {:mvn/version "1.7.0"}}}
:1.8 {:override-deps {org.clojure/clojure {:mvn/version "1.8.0"}}}
:1.9 {:override-deps {org.clojure/clojure {:mvn/version "1.9.0"}}}
:1.10 {:override-deps {org.clojure/clojure {:mvn/version "1.10.0"}}}
:1.10.1 {:override-deps {org.clojure/clojure {:mvn/version "1.10.1"}}}
:master {:override-deps {org.clojure/clojure {:mvn/version "1.11.0-master-SNAPSHOT"}}}
;; testing and debugging tools:
:test {:extra-paths ["test" "src/test/clojure"]
:extra-deps {org.clojure/test.check {:mvn/version "RELEASE"}}}
;; - see https://github.com/cognitect-labs/test-runner
;; - run your tests: clj -A:test:runner
:runner {:extra-deps {com.cognitect/test-runner
{:git/url "https://github.com/cognitect-labs/test-runner"
:sha "3cb0a9daf1cb746259dc8309b218f9211ad3b33b"}}
:main-opts ["-m" "cognitect.test-runner"
"-d" "test"
"-d" "src/test/clojure"]}
;; see https://github.com/jonase/eastwood#running-eastwood-in-a-repl
:eastwood {:extra-deps {jonase/eastwood {:mvn/version "RELEASE"}}
:main-opts ["-m" "eastwood.lint" "{:source-paths,[\"src\"],:test-paths,[\"test\"]}"]}
;; - see https://github.com/clojure-expectations/expectations
;; - run your expectations: clj -A:test:expect:runner
:expect {:extra-deps {expectations {:mvn/version "RELEASE"}}}
;; - see https://github.com/hugoduncan/criterium/
;; - (require '[criterium.core :refer [bench]])
;; - (bench (your-expression))
:bench {:extra-deps {criterium {:mvn/version "RELEASE"}}}
;; - see https://github.com/clojure-goes-fast/clj-memory-meter
;; - (require '[clj-memory-meter.core :as mm])
;; - (mm/measure (your-expression))
:measure {:extra-deps {com.clojure-goes-fast/clj-memory-meter {:mvn/version "RELEASE"}}}
;; - see https://github.com/Olical/depot
:outdated {:extra-deps {olical/depot {:mvn/version "RELEASE"}}
:main-opts ["-m" "depot.outdated.main"]}
;; REPL-related tools:
;; - start a modern nREPL server on a random available port:
:nrepl {:extra-deps {nrepl {:mvn/version "RELEASE"}}
:main-opts ["-m" "nrepl.cmdline"]}
;; - start a legacy nREPL server on port 60606:
:nrepl/old {:extra-deps {org.clojure/tools.nrepl {:mvn/version "RELEASE"}}
:main-opts ["-e" "(require,'[clojure.tools.nrepl.server,:refer,[start-server]]),(start-server,:port,60606)"]}
;; - start a Socket REPL on port 50505:
:socket {:jvm-opts ["-Dclojure.server.repl={:port,50505,:accept,clojure.core.server/repl}"]}
;; - start a Socket pREPL on port 40404:
:prepl {:jvm-opts ["-Dclojure.server.repl={:port,40404,:accept,clojure.core.server/io-prepl}"]}
;; - see https://atom.io/packages/proto-repl
;; - for use with Atom/ProtoREPL: clj -A:proto:nrepl
:proto {:extra-deps {proto-repl {:mvn/version "RELEASE"}}}
;; - see https://github.com/bhauman/rebel-readline
;; - start a Rebel Readline REPL:
:rebel {:extra-deps {com.bhauman/rebel-readline {:mvn/version "RELEASE"}}
:main-opts ["-m" "rebel-readline.main"]}
;; - see https://github.com/stuarthalloway/reflector
;; - my fork includes this https://github.com/stuarthalloway/reflector/pull/1
:reflect
{:extra-deps {com.stuarthalloway/reflector
{:git/url "https://github.com/seancorfield/reflector"
:sha "67d81dbdcab64956abffc128f47b837a2d707b58"}}}
;; - see https://github.com/bbatsov/compliment
:comp {:extra-deps {compliment {:mvn/version "RELEASE"}}}
;; - see https://github.com/cognitect-labs/REBL-distro
;; - you need to download the REBL JAR (and update the local/root below)
;; - you need to be using Clojure 1.10 and either
;; - - Oracle JDK 8 -- use :rebl-8
;; - - OpenJDK 11 -- use :rebl-11
:rebl-8
{:extra-deps {org.clojure/core.async {:mvn/version "0.4.490"}
;; deps for file datafication (0.9.149 or later)
org.clojure/data.csv {:mvn/version "0.1.4"}
org.clojure/data.json {:mvn/version "0.2.3"}
org.yaml/snakeyaml {:mvn/version "1.23"}
com.cognitect/rebl
;; adjust to match your install location
{:local/root "/Developer/REBL/latest/REBL.jar"}}
:main-opts ["-m" "cognitect.rebl"]}
:rebl-11
{:extra-deps {org.clojure/core.async {:mvn/version "0.4.490"}
;; deps for file datafication (0.9.149 or later)
org.clojure/data.csv {:mvn/version "0.1.4"}
org.clojure/data.json {:mvn/version "0.2.3"}
org.yaml/snakeyaml {:mvn/version "1.23"}
com.cognitect/rebl
;; adjust to match your install location
{:local/root "/Developer/REBL/latest/REBL.jar"}
org.openjfx/javafx-fxml {:mvn/version "11.0.1"}
org.openjfx/javafx-controls {:mvn/version "11.0.1"}
org.openjfx/javafx-graphics {:mvn/version "11.0.1"}
org.openjfx/javafx-media {:mvn/version "11.0.1"}
org.openjfx/javafx-swing {:mvn/version "11.0.1"}
org.openjfx/javafx-base {:mvn/version "11.0.1"}
org.openjfx/javafx-web {:mvn/version "11.0.1"}}
:main-opts ["-m" "cognitect.rebl"]}
:deps ; to get access to clojure.tools.deps.alpha.repl/add-lib
;; - now you can add new deps to a running REPL:
;; (require '[clojure.tools.deps.alpha.repl :refer [add-lib]])
;; (add-lib 'some/library {:mvn/version "RELEASE"})
;; - and you can git deps too; here's how to get the master version of a lib:
;; (require '[clojure.tools.gitlibs :as gitlibs])
;; (defn load-master [lib]
;; (let [git (str "https://github.com/" lib ".git")]
;; (add-lib lib {:git/url git :sha (gitlibs/resolve git "master")})))
;; - e.g., using the GitHub path (not the usual Maven group/artifact):
;; (load-master 'clojure/tools.trace)
{:extra-deps {org.clojure/tools.deps.alpha
{:git/url "https://github.com/clojure/tools.deps.alpha"
:sha "e160f184f051f120014244679831a9bccb37c9de"}}}
:spec2 ; to get access to the latest spec-alpha2
{:extra-deps {org.clojure/spec-alpha2
{:git/url "https://github.com/clojure/spec-alpha2"
:sha "29a73a3e5fef8329c14dd44a0b151e90b86c0854"}}}
;; start the Liquid Clojure editor
;; - see https://github.com/mogenslund/liquid
:liquid
{:extra-deps {mogenslund/liquid {:mvn/version "RELEASE"}}
:main-opts ["-m" "dk.salza.liq.core"]}
;; project creation from templates:
;; - see https://github.com/seancorfield/clj-new
;; - create an application project:
;; - clj -A:new app myname/myapp
;; - cd myapp
;; - clj -m myname.myapp # run it!
;; - clj -A:test:runner # run the tests!
;; - create a library project:
;; - clj -A:new lib myname/my-cool-lib
;; - cd my-cool-lib
;; - clj -A:test:runner # run the tests!
:new {:extra-deps {seancorfield/clj-new {:mvn/version "RELEASE"}}
:main-opts ["-m" "clj-new.create"]}
;; uberjar building:
;; - see https://github.com/seancorfield/depstar for a minimalist approach:
;; - clj -A:uberjar result.jar
;; - to run it:
;; - java -cp result.jar clojure.main -m mymain.namespace
;; - build a library JAR:
;; - clj -A:jar result-lib.jar
:uberjar {:extra-deps {seancorfield/depstar {:mvn/version "RELEASE"}}
:main-opts ["-m" "hf.depstar.uberjar"]}
:jar {:extra-deps {seancorfield/depstar {:mvn/version "RELEASE"}}
:main-opts ["-m" "hf.depstar.jar"]}
;; - inspired by Ruby's -pne command line option which lets you process lines of stdin bound to $_
;; - usage: cat file-of-numbers.txt | clj -Mpne -e '($ (-> $_ Long/parseLong inc))'
:pne {:main-opts,["-e","(defmacro,$,[&,body],(list,'while,(list,'when-let,'[$_,(read-line)],(let,[v,(gensym)],(list,'let,(vector,v,(list*,'do,body)),(list,'println,v))),'$_)))"]}}}
You can’t perform that action at this time.