I've been learning some Clojure, and I currently have a single .clj
file which I edit in a text editor and which I execute on the command line.
Where can I find a guide on the practical aspects of scaling this up to larger programs/libraries?
.clj
files on the filesystem?I'm looking for information on the practical aspects on scaling up from small scripts to something real.
I recommend using leiningen. Running
$ lein new myproject
will create a new folder called myproject
inside your current working directory with a default skeleton structure.
Inside the newly generatedmyproject
folder you'll find (among others) a folder named src
for clojure source code and a folder named test
for your tests (leiningen will generate a default failing test).
Leiningen will let you run your tests with lein test
.
You can package your project as a jar file with lein jar
or create an uberjar (an executable jar with all required dependencies included) with lein uberjar
.
For generating documentation I recommend autodoc which integrates nicely with leiningen.
If you are using Netbeans, there is a Clojure plugin which could be helpful to you.
Creating a Clojure project with it creates a bunch of folders: Source Packages, which contains a default package called com.yourcompany, Test Packages, Libraries, which contains the .jar for Clojure and a link to the JDK, and Test Libraries, which contains JUnit.
I use a combo of:
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With