Support //boilerplate/clojure
While this is most likely incomplete or even erroneous, I'd like to start supporting Clojure in this repository.
This commit is contained in:
parent
7a7c29d46c
commit
066b1441b2
6 changed files with 57 additions and 0 deletions
4
boilerplate/clojure/.gitignore
vendored
Normal file
4
boilerplate/clojure/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
/.lein-repl-history
|
||||||
|
/target
|
||||||
|
/?
|
||||||
|
/.nrepl-port
|
33
boilerplate/clojure/README.md
Normal file
33
boilerplate/clojure/README.md
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
# Clojure Boilerplate
|
||||||
|
|
||||||
|
This boilerplate uses `lein` to manage the project.
|
||||||
|
|
||||||
|
## Files to change
|
||||||
|
|
||||||
|
To use this boilerplate, run the following in a shell:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ cp ~/briefcase/boilerplate/clojure path/to/new-project
|
||||||
|
```
|
||||||
|
|
||||||
|
After running the above command, change the following files to remove the
|
||||||
|
placeholder values:
|
||||||
|
|
||||||
|
- `README.md`: Change the title; change the description; drop "Files to change";
|
||||||
|
keep "Getting started"
|
||||||
|
- `project.clj`: Change title
|
||||||
|
- `src/project.clj`: Change `:doc`; drop `main/foo`
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
From a shell, run:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ lein repl
|
||||||
|
```
|
||||||
|
|
||||||
|
From Emacs, navigate to a source code buffer and run:
|
||||||
|
|
||||||
|
```
|
||||||
|
M-x cider-jack-in
|
||||||
|
```
|
3
boilerplate/clojure/dir-locals.nix
Normal file
3
boilerplate/clojure/dir-locals.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
let
|
||||||
|
briefcase = import <briefcase> {};
|
||||||
|
in briefcase.utils.nixBufferFromShell ./shell.nix
|
2
boilerplate/clojure/project.clj
Normal file
2
boilerplate/clojure/project.clj
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
(defproject boilerplate "0.0.1"
|
||||||
|
:dependencies [[org.clojure/clojure "1.8.0"]])
|
7
boilerplate/clojure/shell.nix
Normal file
7
boilerplate/clojure/shell.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
let
|
||||||
|
pkgs = import <nixpkgs> {};
|
||||||
|
in pkgs.mkShell {
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
leiningen
|
||||||
|
];
|
||||||
|
}
|
8
boilerplate/clojure/src/main.clj
Normal file
8
boilerplate/clojure/src/main.clj
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
(ns ^{:doc "Top-level module."
|
||||||
|
:author "William Carroll"}
|
||||||
|
main)
|
||||||
|
|
||||||
|
(declare main)
|
||||||
|
|
||||||
|
(defn foo [a b]
|
||||||
|
(+ a b))
|
Loading…
Reference in a new issue