yemi / exponent-cljs-template

Exponentjs template for Clojurescript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exponent

Exponentjs template for Clojurescript.

Most of the ideas came from re-natal by @drapanjanas and exp-cljstest by @nikki93.

If you have any questions or suggestions, you can also join Exponent slack #clojurescript, https://slack.exponentjs.com/

Features

1. Support both leiningen and boot

2. Support reagent, om and rum (defaults to reagent)

3. Auto generated externs for google closure advanced compilation (experiment)

4. Support source maps

5. Using external modules or assets without restarting the repl.

lein new exponent your-project +reagent
lein new exponent your-project +om
lein new exponent your-project +rum

Setup

2. install Lein or Boot

Usage

lein new exponent your-project

npm install -g yarn
cd your-project
yarn install

;; leiningen users
lein figwheel

;; boot users
boot dev

;; then input (cljs-repl) to connect to boot cljs repl

Add new assets or external modules

  1. require module:
    (def cljs-logo (js/require "./assets/images/cljs.png"))
    (def FontAwesome (js/require "@exponent/vector-icons/FontAwesome"))
  1. Reload simulator or device

Make sure you disable live reload from the Developer Menu, also turn off Hot Module Reload.

Since Figwheel already does those.

Production build (generates js/externs.js and main.js)

leiningen users

lein prod-build

boot users

boot prod

License

Copyright © 2016 Tienson Qin

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

About

Exponentjs template for Clojurescript

License:Eclipse Public License 1.0


Languages

Language:Clojure 76.6%Language:JavaScript 23.4%