Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 60 lines (40 sloc) 1.805 kB
e0219ff @emezeske Initial commit of lein-cljsbuild.
authored
1 # lein-cljsbuild
2
cb80cbc @emezeske Preparing for release.
authored
3 This is a leiningen plugin that makes it easy (and quick) to compile
4 ClojureScript source into JavaScript. It's similar to [cljs-watch] [1],
5 but is driven via lein instead of via a standalone executable.
6
7 [1]: https://github.com/ibdknox/cljs-watch
e0219ff @emezeske Initial commit of lein-cljsbuild.
authored
8
9 ## Installation
10
cb80cbc @emezeske Preparing for release.
authored
11 You can install the plugin via lein:
12
13 $ lein plugin install lein-cljsbuild 0.0.1
14
15 Or by adding lein-cljs to your `project.clj` file in the `:dev-dependencies`
16 section:
17
18 (defproject my-thingie "1.2.3"
19 :dev-dependencies [[emezeske/lein-cljsbuild "0.0.1"]])
20
21 Make sure you pull down the jar file:
22
23 $ lein deps
24
25 ## Configuration
26
27 The lein-cljsbuild configuration is specified under the `:cljsbuild` section
28 of your `project.clj` file:
29
30 (defproject my-thingie "1.2.3"
31 :dev-dependencies [[emezeske/lein-cljsbuild "0.0.1"]]
32 :cljsbuild {
33 ; The path to the top-level ClojureScript source directory:
34 :source-dir "src-cljs"
35 ; The path to the JavaScript output file:
36 :output-file "war/javascripts/main.js"
37 ; Compiler optimization level. May be :whitespace, :simple, or :advanced.
38 ; See the ClojureScript compiler documentation for details.
39 :optimizations :whitespace
40 ; Specifies whether the compiler will format the JavaScript output nicely.
41 :pretty-print true})
e0219ff @emezeske Initial commit of lein-cljsbuild.
authored
42
43 ## Usage
44
cb80cbc @emezeske Preparing for release.
authored
45 Once the plugin is installed, you can build the ClojureScript once:
46
47 $ lein cljsbuild once
48
49 Or you can have lein-cljsbuild watch your source files for changes and
50 automatically rebuild them. This is recommended for development, as it
51 avoids the time-consuming JVM startup for each build:
52
53 $ lein cljsbuild auto
e0219ff @emezeske Initial commit of lein-cljsbuild.
authored
54
55 ## License
56
cb80cbc @emezeske Preparing for release.
authored
57 Source Copyright © Evan Mezeske, 2011.
58 Released under the Eclipse Public License - v 1.0.
59 See the file COPYING.
Something went wrong with that request. Please try again.