Skip to content

hoplon/boot-hoplon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

boot-hoplon

[hoplon/boot-hoplon "0.3.0"] ;; latest release

Boot task for building Hoplon web applications.

What's In The Box™

  • Generate HTML page and CLJS namespace from Hoplon .hl file.
  • Prerender application HTML in PhantomJS.
  • Generate HTML page according to namespace metadata in regular .cljs files.
  • Provides extended ns+ form to make namespace declarations work in .cljs files the way they work in .clj (that is, :use and :refer work as in Clojure and there is no need to use :require-macros, :use-macros, or :refer-macros --- it just figures out what to do automatically).

Usage

Add boot-hoplon to your build.boot dependencies and require the namespace.

Note: the boot-hoplon dependency is only needed at when compiling Hoplon source files, but hoplon itself is needed both when compiling and at runtime. So you should add boot-hoplon with the test scope and hoplon with the (default) compile scope.

(merge-env!
  :dependencies '[[hoplon "A.B.C"]
                  [hoplon/boot-hoplon "X.Y.Z" :scope "test"])
(require '[hoplon.boot-hoplon :refer :all])

You can see the options available on the command line:

boot hoplon -h

or in the REPL:

boot.user=> (doc hoplon)

Compile Hoplon Pages

If you only want to compile Hoplon → ClojureScript+HTML, you can do:

boot hoplon

License

Copyright © 2014 Alan Dipert and Micha Niskin

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.