Liking cljdoc? Tell your friends :D
Hoplon Logo

Hoplon

clojars [snapshot status]9

road map Backers on Open Collective Sponsors on Open Collective cljdoc badge

Hoplon is a set of tools and libraries for making web applications.

Hoplon provides a compiler for web application frontend development, and includes the following libraries as dependencies to complete the stack:

  • Javelin: a spreadsheet-like dataflow library for managing client state. Hoplon tightly integrates with Javelin to reactively bind DOM elements to the underlying Javelin cell graph.
  • Castra: a full-featured RPC library for Clojure and ClojureScript, providing the serverside environment. (optional)

Quickstart

Install deps-new if you haven't already:

clojure -Ttools install io.github.seancorfield/deps-new '{:git/tag "v0.5.1"}' :as new

And then generate a starter project with:

clojure -Sdeps '{:deps {io.github.hoplon/project-template {:git/tag "v0.2.0" :git/sha "5a10650"}}}' -Tnew create :template hoplon/hoplon :name your/app-name

Example

A small bit of Hoplon:

(ns view.index
  (:require [hoplon.core  :as h]
            [hoplon.goog]
            [javelin.core :as j]))

(defn my-list [& items]
  (h/div
    :class "my-list"
    (apply h/ul (map #(h/li (h/div :class "my-list-item" %)) items))))

(def clicks (j/cell 0))

(defn hello []
  (h/div
    (h/h1 "Hello, Hoplon")
    (my-list
      (h/span "first thing")
      (h/span "second thing"))
    (h/p (h/text "You've clicked ~{clicks} times, so far."))
    (h/button :click #(swap! clicks inc) "click me")))

Browser Support

Hoplon has been thoroughly tested on desktop and mobile devices against the following browsers:

IEdge Firefox Safari Chrome Opera Android

Documentation

Demos

Developing Hoplon itself

# build and install locally
clojure -T:build ci :snapshot true
clojure -T:build install :snapshot true

Testing

This setup will run tests using chrome-webdriver.

Setup

npm install
npm install -g karma-cli

Run

clojure -T:build test

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers! πŸ™ [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]

License

Copyright (c) Alan Dipert and Micha Niskin. All rights reserved.

The use and distribution terms for this software are covered by the Eclipse
Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which can
be found in the file epl-v10.html at the root of this distribution. By using
this software in any fashion, you are agreeing to be bound by the terms of
this license. You must not remove this notice, or any other, from this software.

Can you improve this documentation? These fine people already did:
Micha Niskin, Matthew Ratzke, Alan Dipert, mynomoto, Bill La Forge, jumblerg, jab, Christopher Holly, LΓ©on Talbot, Levi Tan Ong, Craig Andera, Making GitHub Delicious. & jess
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

Γ— close