Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hoplon/hoplon
Simple and powerful tool for building web apps out of highly composable elements in ClojureScript.
https://github.com/hoplon/hoplon
Last synced: 1 day ago
JSON representation
Simple and powerful tool for building web apps out of highly composable elements in ClojureScript.
- Host: GitHub
- URL: https://github.com/hoplon/hoplon
- Owner: hoplon
- License: epl-1.0
- Created: 2013-05-15T21:06:03.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2024-10-11T00:57:52.000Z (4 months ago)
- Last Synced: 2024-10-29T15:27:15.770Z (4 months ago)
- Language: Clojure
- Homepage: https://hoplon.io/
- Size: 1.95 MB
- Stars: 1,019
- Watchers: 50
- Forks: 65
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Hoplon
[](https://clojars.org/hoplon)
[](https://cljdoc.org/d/hoplon/hoplon)Hoplon is a ClojureScript library that unify some of the web platform's
idiosyncrasies and present a fun way to design and build single-page web
applications.Hoplon tightly integrates with Javelin to reactively bind DOM elements to the
underlying [Javelin][1] cell graph.### Quickstart
Install [deps-new](https://github.com/seancorfield/deps-new) if you haven't already:
clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new
And then generate a starter project with:
clojure -Sdeps '{:deps {io.github.hoplon/project-template {:git/tag "v1.0.0" :git/sha "14361f1"}}}' -Tnew create :template hoplon/hoplon :name your/app-name
### Example
A small bit of Hoplon:```clojure
(ns view.index
(:require
[hoplon.core :as h]
[hoplon.dom]
[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:




### Documentation
* [The Wiki][6]
* [Design Document][3] (early version)### Demos
* [Hoplon demos][5] and [demos source code][2]
## 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
```
; Run tests in simple compilation
clojure -T:build test; Run tests in advanced compilation
clojure -T:build advanced-test
```## Contributors
This project exists thanks to all the people who contribute.
## 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.
```[1]: https://github.com/hoplon/javelin
[2]: https://github.com/hoplon/demos
[3]: https://github.com/hoplon/hoplon/blob/cf9d2d1e806d36d098ae1def3b130df2bcd69e55/Design.md
[4]: https://hoplon.io/
[5]: https://hoplon.github.io/demos/
[6]: https://github.com/hoplon/hoplon/wiki