Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FiV0 committed Oct 7, 2021
0 parents commit 4e58b4e
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dir-locals.el
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))))
13 changes: 13 additions & 0 deletions .gitignore
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
.#*
16 changes: 16 additions & 0 deletions README.md
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
29 changes: 29 additions & 0 deletions build.clj
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))
20 changes: 20 additions & 0 deletions deps.edn
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"}}}
1 change: 1 addition & 0 deletions dev/user.clj
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(ns user)
Empty file added resources/public/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions src/scratch.clj
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 added test/.gitkeep
Empty file.

0 comments on commit 4e58b4e

Please sign in to comment.