Skip to content

Commit

Permalink
Merge tag '0.1.2'
Browse files Browse the repository at this point in the history
Release 0.1.2.
  • Loading branch information
emezeske committed Feb 29, 2012
2 parents 2ec37fb + b05f2b5 commit eefe08f
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 43 deletions.
36 changes: 18 additions & 18 deletions README.md
Expand Up @@ -7,9 +7,9 @@ to install and allows you to configure the ClojureScript compiler from within yo

Beyond basic compiler support, lein-cljsbuild can optionally help with a few other things:

* [Launching REPLs for interactive development] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/doc/REPL.md)
* [Launching ClojureScript tests] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/doc/TESTING.md)
* [Sharing code between Clojure and ClojureScript] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/doc/CROSSOVERS.md)
* [Launching REPLs for interactive development] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/doc/REPL.md)
* [Launching ClojureScript tests] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/doc/TESTING.md)
* [Sharing code between Clojure and ClojureScript] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/doc/CROSSOVERS.md)

## Requirements

Expand All @@ -25,7 +25,7 @@ adding lein-cljsbuild to your `project.clj` file in the `:plugins` section:
```clj
; Using Leiningen 1.7.0 or newer:
(defproject lein-cljsbuild-example "1.2.3"
:plugins [[lein-cljsbuild "0.1.1"]])
:plugins [[lein-cljsbuild "0.1.2"]])
```

For versions of Leiningen older than `1.7.0` (not recommended), add
Expand All @@ -34,7 +34,7 @@ lein-cljsbuild to the `:dev-dependencies` section instead:
```clj
; Using Leiningen 1.6.x or older:
(defproject lein-cljsbuild-example "1.2.3"
:dev-dependencies [[lein-cljsbuild "0.1.1"]])
:dev-dependencies [[lein-cljsbuild "0.1.2"]])
```

Make sure you pull down the jar file:
Expand All @@ -45,21 +45,21 @@ Make sure you pull down the jar file:

The `:cljsbuild` configuration format has changed. This version is backwards-compatible
with `0.0.x`, but the next major version won't be. See the
[migration documentation] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/doc/MIGRATING-TO-0.1.1.md)
[migration documentation] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/doc/MIGRATING-TO-0.1.2.md)
for details.

## Just Give Me a Damned Example Already!

See the
[example-projects] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/example-projects)
[example-projects] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/example-projects)
directory for a couple of simple examples of how to use lein-cljsbuild. The
[simple project] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/example-projects/simple)
[simple project] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/example-projects/simple)
shows a dead-simple "compile only" configuration, which is a good place to start. The
[advanced project] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/example-projects/advanced)
[advanced project] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/example-projects/advanced)
contains examples of how to use the extended features of the plugin.

Also, see the
[sample.project.clj] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/sample.project.clj)
[sample.project.clj] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/sample.project.clj)
file for an exhaustive list of all options supported by lein-cljsbuild.

## Basic Configuration
Expand All @@ -69,7 +69,7 @@ of your `project.clj` file. A simple project might look like this:

```clj
(defproject lein-cljsbuild-example "1.2.3"
:plugins [[lein-cljsbuild "0.1.1"]]
:plugins [[lein-cljsbuild "0.1.2"]]
:cljsbuild {
:builds [{
; The path to the top-level ClojureScript source directory:
Expand All @@ -83,7 +83,7 @@ of your `project.clj` file. A simple project might look like this:
```

For an exhaustive list of the configuration options supported by lein-cljsbuild, see the
[sample.project.clj] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/sample.project.clj)
[sample.project.clj] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/sample.project.clj)
file.

## Basic Usage
Expand Down Expand Up @@ -131,7 +131,7 @@ JAR file.
```

If you are using the
[crossovers] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/doc/CROSSOVERS.md)
[crossovers] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/doc/CROSSOVERS.md)
feature, and want the `:crossover-path` included in the JAR file, add this entry to your
top-level `:cljsbuild` configuration:

Expand All @@ -147,7 +147,7 @@ and will build all of them in parallel:

```clj
(defproject lein-cljsbuild-example "1.2.3"
:plugins [[lein-cljsbuild "0.1.1"]]
:plugins [[lein-cljsbuild "0.1.2"]]
:cljsbuild {
:builds [
{:source-path "src-cljs-main"
Expand All @@ -161,27 +161,27 @@ This allows cljsbuild to compile in all four optimization levels at once, for
easier testing, or to compile a test suite alongside the library code.

See the
[example-projects/advanced] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/example-projects/advanced)
[example-projects/advanced] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/example-projects/advanced)
directory for a working example of a project that uses this feature.

## REPL Support

Lein-cljsbuild has built-in support for launching ClojureScript REPLs in a variety
of ways. See the
[REPL documentation] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/doc/REPL.md)
[REPL documentation] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/doc/REPL.md)
for more details.

## Testing Support

Lein-cljsbuild has built-in support for running external ClojureScript test processes. See the
[testing documentation] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/doc/TESTING.md)
[testing documentation] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/doc/TESTING.md)
for more details.

## Sharing Code Between Clojure and ClojureScript

Sharing code with lein-cljsbuild is accomplished via the configuration
of "crossovers". See the
[crossovers documentation] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/doc/CROSSOVERS.md)
[crossovers documentation] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/doc/CROSSOVERS.md)
for more details.

## License
Expand Down
2 changes: 1 addition & 1 deletion doc/CROSSOVERS.md
Expand Up @@ -35,7 +35,7 @@ And your `project.clj` file looks like this:

```clj
(defproject lein-cljsbuild-example "1.2.3"
:plugins [[lein-cljsbuild "0.1.1"]]
:plugins [[lein-cljsbuild "0.1.2"]]
:source-path "src-clj"
:cljsbuild {
; Each entry in the :crossovers vector describes a Clojure namespace
Expand Down
6 changes: 3 additions & 3 deletions doc/MIGRATING-TO-0.1.0.md
@@ -1,9 +1,9 @@
# Migrating from 0.0.x to 0.1.x

The `0.1.1` release of lein-cljsbuild adds several new features that necessitate
The `0.1.2` release of lein-cljsbuild adds several new features that necessitate
some changes to the format of the `:cljsbuild` configuration entry.

With that said, `0.1.1` **is** backwards-compatible with your existing configuration.
With that said, `0.1.2` **is** backwards-compatible with your existing configuration.
However, it will be complaining loudly about how it's deprecated. This document
explains how to fix that.

Expand All @@ -17,7 +17,7 @@ that may be renamed in the new version. Most importantly, it will remove any cr
that have been copied into place. **This is very important. If you are using crossovers,
skipping this step will cause pain!**

Once you've updated your project to use `[lein-cljsbuild "0.1.1"]`, run any subcommand,
Once you've updated your project to use `[lein-cljsbuild "0.1.2"]`, run any subcommand,
for instance, `lein cljsbuild once`. The plugin will complain that your configuration
is deprecated. However, it should automatically convert your `:cljsbuild` entry to the new
format, and print it out.
Expand Down
4 changes: 2 additions & 2 deletions doc/REPL.md
Expand Up @@ -60,7 +60,7 @@ between them. To configure a launch preset, add an entry to the `:repl-launch-c

```clj
(defproject lein-cljsbuild-example "1.2.3"
:plugins [[lein-cljsbuild "0.1.1"]]
:plugins [[lein-cljsbuild "0.1.2"]]
:cljsbuild {
:repl-listen-port 9000
:repl-launch-commands
Expand Down Expand Up @@ -99,7 +99,7 @@ treated as an option map. Currently, the only supported options are
```

For more ideas on how to use `repl-launch`, take a look at the
[advanced example project] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/example-projects/advanced)
[advanced example project] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/example-projects/advanced)
It has several examples of useful launch commands, with descriptions in its README.
Note that, in particular, the possibilities with
[PhantomJS] (http://www.phantomjs.org)
Expand Down
8 changes: 4 additions & 4 deletions doc/TESTING.md
Expand Up @@ -7,7 +7,7 @@ test:

```clj
(defproject lein-cljsbuild-example "1.2.3"
:plugins [[lein-cljsbuild "0.1.1"]]
:plugins [[lein-cljsbuild "0.1.2"]]
:cljsbuild {
:test-commands
{"my-test" ["phantomjs" "phantom/unit-test.js" "..."]})
Expand Down Expand Up @@ -38,18 +38,18 @@ browser to do, except it does not have a GUI. PhantomJS can be automated via Ja
and thus is convenient to use for running automated tests.

The
[advanced example project] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/example-projects/advanced)
[advanced example project] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/example-projects/advanced)
contains an example of how to use PhantomJS for running ClojureScript tests. There are several
components that come together to make this work:

1. A `:builds` entry dedicated to the test code in the `test-cljs` directory. This compiles
the unit tests into JavaScript (so that it they can be run by PhantomJS).

2. A
[static HTML page] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/example-projects/advanced/resources/private/html/unit-test.html)
[static HTML page] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/example-projects/advanced/resources/private/html/unit-test.html)
with a `<script>` tag that will pull in the compiled unit test code when the page is loaded.

3. A `:test-commands` entry that runs PhantomJS, passing it
[a simple script] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.1/example-projects/advanced/phantom/unit-test.js)
[a simple script] (https://github.com/emezeske/lein-cljsbuild/blob/0.1.2/example-projects/advanced/phantom/unit-test.js)
. This script directs PhantomJS to load the static HTML page, and once it's loaded,
to call the ClojureScript unit test entry point.
12 changes: 6 additions & 6 deletions example-projects/advanced/README.md
Expand Up @@ -41,11 +41,11 @@ See the `phantom/unit-test.js` file for details on how this works.

## Connecting Firefox to a REPL

First, start the Ring server in the background:
First, in one terminal, start the Ring server:

$ lein ring server-headless 3000 &
$ lein ring server-headless 3000

Now, run `repl-launch` with the "firefox" identifier and the URL of the REPL demo page:
Now, in a different terminal, run `repl-launch` with the "firefox" identifier and the URL of the REPL demo page:

$ lein trampoline cljsbuild repl-launch firefox http://localhost:3000/repl-demo

Expand All @@ -68,11 +68,11 @@ need to have your app running in the background:
via Javascript. It provides a Javascript execution environment with access to all browser
features (the DOM, etc), without opening a browser GUI.

To try out a PhantomJS-based REPL, first start the Ring server in the background:
To try out a PhantomJS-based REPL, first start the Ring server in one terminal:

$ lein ring server-headless 3000 &
$ lein ring server-headless 3000

Now, run `repl-launch` with the "phantom" identifier and the URL of the REPL demo page:
Now, in a different terminal, run `repl-launch` with the "phantom" identifier and the URL of the REPL demo page:

$ lein trampoline cljsbuild repl-launch phantom http://localhost:3000/repl-demo

Expand Down
4 changes: 2 additions & 2 deletions example-projects/advanced/project.clj
@@ -1,4 +1,4 @@
(defproject cljsbuild-example-advanced "0.1.1"
(defproject cljsbuild-example-advanced "0.1.2"
:description "An advanced example of how to use lein-cljsbuild"
:source-path "src-clj"
:dependencies [[org.clojure/clojure "1.3.0"]
Expand All @@ -12,7 +12,7 @@
com.sun.jdmk/jmxtools
com.sun.jmx/jmxri]]]
:dev-dependencies [[lein-ring "0.5.4"]]
:plugins [[lein-cljsbuild "0.1.1"]]
:plugins [[lein-cljsbuild "0.1.2"]]
; Enable the lein hooks for: clean, compile, test, and jar.
:hooks [leiningen.cljsbuild]
:cljsbuild {
Expand Down
4 changes: 2 additions & 2 deletions example-projects/simple/project.clj
@@ -1,11 +1,11 @@
(defproject cljsbuild-example-simple "0.1.1"
(defproject cljsbuild-example-simple "0.1.2"
:description "A simple example of how to use lein-cljsbuild"
:source-path "src-clj"
:dependencies [[org.clojure/clojure "1.3.0"]
[compojure "1.0.1"]
[hiccup "0.3.8"]]
:dev-dependencies [[lein-ring "0.5.4"]]
:plugins [[lein-cljsbuild "0.1.1"]]
:plugins [[lein-cljsbuild "0.1.2"]]
:cljsbuild {
:builds [{:source-path "src-cljs"
:compiler {:output-to "resources/public/js/main.js"
Expand Down
2 changes: 1 addition & 1 deletion plugin/project.clj
@@ -1,4 +1,4 @@
(defproject lein-cljsbuild "0.1.1"
(defproject lein-cljsbuild "0.1.2"
:description "ClojureScript Autobuilder Plugin"
:url "http://github.com/emezeske/lein-cljsbuild"
:license {:name "Eclipse Public License - v 1.0"
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/leiningen/cljsbuild/subproject.clj
Expand Up @@ -2,7 +2,7 @@
"Utilities for running cljsbuild in a subproject")

(def cljsbuild-dependencies
'[[cljsbuild "0.1.1"]])
'[[cljsbuild "0.1.2"]])

(defn- merge-dependencies [project-dependencies]
(let [dependency-map #(into {} (map (juxt first rest) %))
Expand Down
2 changes: 1 addition & 1 deletion sample.project.clj
Expand Up @@ -10,7 +10,7 @@
:dependencies [[org.clojure/clojure "1.3.0"]]
; Your project should plugin-depend on lein-cljsbuild, to ensure that
; the right version of the plugin is installed.
:plugins [[lein-cljsbuild "0.1.1"]]
:plugins [[lein-cljsbuild "0.1.2"]]
; The standard Leiningen :source-path option is used by lein-cljsbuild
; to determine the source directory from which crossover files will
; be copied. Leiningen defaults to "src".
Expand Down
4 changes: 2 additions & 2 deletions support/project.clj
@@ -1,11 +1,11 @@
(defproject cljsbuild "0.1.1"
(defproject cljsbuild "0.1.2"
:description "ClojureScript Autobuilder"
:url "http://github.com/emezeske/lein-cljsbuild"
:license {:name "Eclipse Public License - v 1.0"
:url "http://www.eclipse.org/legal/epl-v10.html"
:distribution :repo}
:dependencies [[org.clojure/clojure "1.3.0"]
[org.clojure/clojurescript "0.0-971"
[org.clojure/clojurescript "0.0-993"
:exclusions [org.apache.ant/ant]]
[fs "1.1.2"]
[clj-stacktrace "0.2.4"]])

0 comments on commit eefe08f

Please sign in to comment.