• This repository has been archived on 28/Dec/2018
  • Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    JavaScript
  • License
    Eclipse Public Li...
  • Created over 10 years ago
  • Updated almost 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

UI template for om, mesh, and core.async

Mala

A UI template (and reference app) built on Om, with modular components, router, async event handling, and responsive design with an emphasis on using Clojurescript all the way.

Features

  • Project structure for design and ui components
  • Integrated Om components
  • Responsive Design with Clojurescript using Mesh (not bootstrap, not less/sass)
  • Core.async
  • Reloadable code with Figwheel
  • Routing with Secretary
  • Mock api server with real Compojure routes
  • Curated cljsjs libraries
  • Integrated Ankha inspector, Om-i instrumentation
  • Strictly follows Om releases

Quickstart

lein new mala chant
cd chant

The generated src looks like this:

src
β”œβ”€β”€ layout
β”‚   β”œβ”€β”€ grid.clj
β”‚   β”œβ”€β”€ index.clj
β”‚   └── typography.clj
└── ui
    β”œβ”€β”€ client.cljs
	β”œβ”€β”€ components
	    β”œβ”€β”€ <comp>.cljs
		β”œβ”€β”€ <comp-style>.cljs
	β”œβ”€β”€ router.cljs
	β”œβ”€β”€ state.cljs
	β”œβ”€β”€ types.cljs
	└── utils.cljs
 	β”œβ”€β”€ core.cljs
env
└── dev
   β”œβ”€β”€ mock.clj
   └── repl.cljs
   └── debug.cljs

Start figwheel, watch garden, and a figwheel server integrated with mock router:

lein dev

Open http://localhost:3449/ and look for a Cljs brepl on the prompt.

Emacs Cider users can start a repl with the following commands

M-x cider-connect <RET>
localhost <RET>
7888 <RET>
(at the prompt ...)
(use 'figwheel-sidecar.repl-api)
(cljs-repl)

Ready to deploy? Generate an optimized js file

lein release

Wiki

For more info, see the wiki.

Leiningen Template

A lein-template based on this reference app is under lein. Significant changes in the project structure and dependencies will be updated both in the reference app and leiningen template.

For a production-ready Ring server template for building tiny services, see my other template, ring-micro.

Credits

A big thanks to @swannodette for Om, Joel Holbrooks for Garden, and Bhauman for Fighweel. Some code samples were copied from:

Status

Clojars Project

License

Copyright Β© 2016 Priyatam Mudivarti.

Released under the Eclipse Public License, same as Clojure.