Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/deraen/boot-cljx

Boot task to compile Cljx
https://github.com/deraen/boot-cljx

Last synced: 12 days ago
JSON representation

Boot task to compile Cljx

Awesome Lists containing this project

README

        

# boot-cljx
[![Clojars Project](http://clojars.org/deraen/boot-cljx/latest-version.svg)](http://clojars.org/deraen/boot-cljx)

**Cljx is deprecated, please use [cljc](http://dev.clojure.org/display/design/Reader+Conditionals) instead.**

[Boot](https://github.com/boot-clj/boot) task to compile Cljx.

* Provides the `cljx` task
* Reads `.cljx` files and creates corresponding `.clj` and `.cljs` files.
Resulting files will be available to others tasks and on classpath.
* Adds cljx nrepl middleware to repl task default settings
* Make sure your cljx task is run before repl task

## Use

```clojure
; All files (.clj, .cljx, .cljs) could be on the same directory,
; but I like to have separate directories per filetype.
(set-env! :src-paths #{"src/cljx" "src/clj" "src/cljs"})

; Run cljx before cljs
; $ boot cljx cljs ...
(deftask package
"Package the app"
[]
(comp
(cljx)
(cljs)
...))
```

## License

Copyright (C) 2014-2015 Juho Teperi

Distributed under the MIT License.