generated from FiV0/clj-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4e58b4e
Showing
9 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
((nil . ((cider-clojure-cli-global-options . "-A:dev:test:build") | ||
(cider-preferred-build-tool . clojure-cli) | ||
(cider-redirect-server-output-to-repl . t) | ||
(cider-repl-display-help-banner . nil) | ||
(clojure-toplevel-inside-comment-form . t)))) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.cpcache | ||
.nrepl-port | ||
target | ||
repl | ||
.shadow-cljs | ||
target | ||
yarn.lock | ||
node_modules/ | ||
.DS_Store | ||
resources/public/ui | ||
.store | ||
out | ||
.#* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# {project} | ||
|
||
Executing the program can either be done via | ||
``` | ||
clj -M -m scratch :arg1 :arg2 | ||
``` | ||
or by compiling a jar via | ||
``` | ||
clj -T:build clean | ||
clj -T:build jar | ||
``` | ||
and executing it via | ||
``` | ||
java -jar target/lib-0.1.4.jar :arg1 :arg2 | ||
``` | ||
## License |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(ns build | ||
(:require [clojure.tools.build.api :as b])) | ||
|
||
(def lib 'clj.template/lib) | ||
(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)) | ||
(def main 'scratch) | ||
|
||
(defn clean | ||
"Cleans the target path." | ||
[_] | ||
(b/delete {:path "target"})) | ||
|
||
(defn jar [_] | ||
(b/copy-dir {:src-dirs ["src" "resources"] | ||
:target-dir class-dir}) | ||
(b/compile-clj {:basis basis | ||
:src-dirs ["src"] | ||
:class-dir class-dir}) | ||
(b/uber {:class-dir class-dir | ||
:uber-file jar-file | ||
:main main | ||
:basis basis})) | ||
|
||
(comment | ||
(clean nil) | ||
(jar nil)) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{:paths ["src" "resources"] | ||
|
||
:deps | ||
{org.clojure/clojure {:mvn/version "1.10.3"}} | ||
|
||
:aliases | ||
{:dev | ||
{:extra-paths ["dev"] | ||
:extra-deps {}} | ||
|
||
:test | ||
{:extra-paths ["test"] | ||
:extra-deps {lambdaisland/kaocha {:mvn/version "1.0.632"}}} | ||
|
||
:build {:extra-deps {io.github.clojure/tools.build {:git/tag "v0.5.1" :git/sha "21da7d4"}} | ||
:ns-default build}} | ||
|
||
:mvn/repos | ||
{"central" {:url "https://repo1.maven.org/maven2/"} | ||
"clojars" {:url "https://clojars.org/repo"}}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(ns user) |
Empty file.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(ns scratch | ||
(:gen-class)) | ||
|
||
(defn -main [& args] | ||
(println "Hello from Clojure!!! " args)) |
Empty file.