Giter Club home page Giter Club logo

lein-clr's Introduction

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.)

  1. Create a new Leiningen project

    C:\work> lein new lein-clr foo
    C:\work> cd foo
  2. The default project.clj does not enable automatic download of ClojureCLR; enable that by editing project.clj under :clr as follows:

    • Uncomment [:wget :clj-zip :clj-url] and [:unzip "../clj" :clj-zip] under :deps-cmds.
    • Under :main-cmd and :compile-cmd replace :clj-exe with :clj-dep.
  3. 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.)

  1. Download a recent ClojureCLR binary package from here:

    http://sourceforge.net/projects/clojureclr/files/

  2. 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

  3. Create a new Leiningen project

    C:\work> lein new lein-clr foo
    C:\work> cd foo
  4. 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.

lein-clr's People

Contributors

kumarshantanu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.