Last active
September 5, 2019 19:32
-
-
Save semperos/8810aca9c846f3308c2d830915e89267 to your computer and use it in GitHub Desktop.
Clojure deps.edn Workflow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:aliases {:dev {:extra-deps | |
{org.clojure/tools.nrepl {:mvn/version "0.2.13"} | |
cider/cider-nrepl {:mvn/version "0.17.0-SNAPSHOT"}}} | |
:std {:extra-paths ["resources"]} | |
:test {:extra-paths ["test"]}} | |
:mvn/repos {"private-repo" {:url "https://example.com/repository/maven-releases/"}}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd "$(dirname $0)/.." | |
REPL_PORT=8999 clj -C:std -R:std:dev -i $HOME/opt/user.clj -r |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd "$(dirname $0)/.." | |
MAIN_NS="my.main.ns" | |
echo "Running $MAIN_NS..." | |
echo "" | |
clj -C:std -m $MAIN_NS $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd "$(dirname $0)/.." | |
echo "Running test suite..." | |
TEST_NS="'my.main.ns-test" | |
clj -C:std:test -R:std -e "(do (require 'clojure.test $TEST_NS) (clojure.test/run-tests $TEST_NS))" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns user | |
(:require [clojure.tools.nrepl.server :refer [start-server stop-server]] | |
[cider.nrepl :refer (cider-nrepl-handler)])) | |
(defonce nrepl-server (start-server :port (Integer/parseInt (or (get (System/getenv) "REPL_PORT") "7888")) :handler cider-nrepl-handler)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment