-
Notifications
You must be signed in to change notification settings - Fork 12
Quickstart Unix
TODO: Prereqs (Ruby, Java, ?)
Option 1: Use gem (a.k.a., "RubyGems")
If you already have gem installed, this is the preferred way to install Cake: $ sudo gem install cake
Download the script, put it on your path, and make it executable. e.g.: $ wget http://github.com/ninjudd/cake-standalone/raw/master/cake $ mv cake /usr/local/bin $ chmod +x /usr/local/bin/cake
You can verify your install by running the Cake help command, which will list the main Cake tasks: $ cake help
You can get detailed help info for an individual task with "cake help [TASK]", like: $ cake help test
Cake uses the same project layout as leiningen, and expects a valid project.clj file. Below is a very simple example project.
|-- project.clj
|-- src
| `-- myproj.clj
`-- test
`-- test_myproj.clj
(defproject myproj "0.1"
:dependencies [[clojure "1.2.0"]])
(ns myproj)
(defn myfn [arg]
(str "my-" arg))
(ns test-myproj
(:use clojure.test myproj))
(deftest test-myfn
(is (= (myfn "arg1") "my-arg1")))
$ cake test
Congratulations, you've just compiled and tested your Clojure project with Cake!
Once you have Cake installed and running, head over to the Tutorial(TODO).