Hoplon
Simple and powerful tool for building web apps out of highly composable elements in ClojureScript.
Install / Use
/learn @hoplon/HoplonREADME
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 cell graph.
Quickstart
Install 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:
(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
- Design Document (early version)
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
; 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.
<a href="https://github.com/hoplon/hoplon/graphs/contributors"> <img src="https://contrib.rocks/image?repo=hoplon/hoplon" /> </a>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.
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
