lein-clr
                                
                                 lein-clr copied to clipboard
                                
                                    lein-clr copied to clipboard
                            
                            
                            
                        Leiningen plugin to automate build tasks for ClojureCLR projects
lein-clr
A Leiningen plugin to automate build tasks for ClojureCLR projects.
Leiningen 2 is required to use this plugin. You can use it for both .NET and Mono.
Important: This plugin is in Beta. Please report bugs, share ideas, comments etc.
Installation
Install as a project level plugin in project.clj:
:plugins [[lein-clr "0.2.2"]]
Note: lein-clr redefines the environment variables CLOJURE_LOAD_PATH
and CLOJURE_COMPILE_PATH internally ignoring their original values.
Usage
The lein-clr plugin needs a :clr key in project.clj for CLR related details. See sample.project.clj for examples. The sub-sections below show how to get started.
Quickstart in 3 steps -- requires curl/wget and unzip on PATH
(Assuming you are on Windows with a recent version of the .NET framework or Mono.
It should work on Unix-like systems using Mono if available in PATH. If you do
not have curl/wget and unzip on PATH, consider Quickstart in 4 steps.)
- 
Create a new Leiningen project C:\work> lein new lein-clr foo C:\work> cd foo
- 
The default project.cljdoes not enable automatic download of ClojureCLR; enable that by editingproject.cljunder:clras follows:- Uncomment [:wget :clj-zip :clj-url]and[:unzip "../clj" :clj-zip]under:deps-cmds.
- Under :main-cmdand:compile-cmdreplace:clj-exewith:clj-dep.
 
- Uncomment 
- 
Run the build tasks C:\work\foo> lein clr test C:\work\foo> lein clr run -m foo.core C:\work=foo> lein clr -v compile foo.core
Quickstart in 4 steps
(Assuming you are on Windows with a recent version of the .NET framework or
Mono. It should work on Unix-like systems using Mono if available in PATH.)
- 
Download a recent ClojureCLR binary package from here: http://sourceforge.net/projects/clojureclr/files/ 
- 
Uncompress it into a suitable directory and define an environment variable pointing to that directory location, e.g: CLJCLR14_40=C:\clojure-clr-1.4.1-Debug-40
- 
Create a new Leiningen project C:\work> lein new lein-clr foo C:\work> cd foo
- 
Try the build tasks C:\work\foo> lein clr test C:\work\foo> lein clr run -m foo.core C:\work\foo> lein clr -v compile
Build tasks
You can carry out a number of build tasks for ClojureCLR projects using Microsoft .NET or Mono. A synopsis of the tasks:
lein clr [-v] clean
lein clr [-v] compile
lein clr [-v] help
lein clr [-v] repl
lein clr [-v] run [-m ns-having-main] [arg1 [arg2] ...]
lein clr [-v] test [test-ns1 [test-ns2] ...]
Project configuration
lein-clr uses some regular attributes from project.clj for build tasks.
Besides, there are some specific attributes you can refer to in the
sample.project.clj file in this repo.
Getting in touch
Clojure discussion group: https://groups.google.com/group/clojure
Leiningen discussion group: https://groups.google.com/group/leiningen
With me: By Email or on Twitter: @kumarshantanu
License
Copyright © 2012-2014 Shantanu Kumar
Distributed under the Eclipse Public License, the same as Clojure.