• This repository has been archived on 22/Dec/2020
  • Stars
    star
    156
  • Rank 239,589 (Top 5 %)
  • Language
    Clojure
  • License
    MIT License
  • Created about 10 years ago
  • Updated over 6 years ago

Reviews

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

Repository Details

Leiningen template for Reagent applications in Clojurescript with Figwheel. Optionally includes secretary, cljs.test, garden, less, cider, devcards, cljs-devtools, re-risk

reagent-figwheel (leiningen template)

Leiningen template for reagent web apps.

Through the use of profiles, this template lets the developer pick and choose what is included in their application.

Usage

The base template includes:

To create an application with the base template:

lein new reagent-figwheel <project-name>

The optional profiles include:

To add a profile to the base template, just append the profile name (let's use +routes as an example):

lein new reagent-figwheel <project-name> +routes

Any combinations of profiles can be added at once, for example:

lein new reagent-figwheel <project-name> +cider +test +garden +less +routes +re-frisk

Development Mode

Start Cider from Emacs (if using +cider):

Put this in your Emacs config file:

(setq cider-cljs-lein-repl "(do (use 'figwheel-sidecar.repl-api) (start-figwheel!) (cljs-repl))")

Navigate to a clojurescript file and start a figwheel REPL with cider-jack-in-clojurescript or (C-c M-J)

cljs-devtools (if using +devtools)

To enable:

  1. Open Chrome's DevTools,Ctrl-Shift-i
  2. Open "Settings", F1
  3. Check "Enable custom formatters" under the "Console" section
  4. close and re-open DevTools

Compile css (if using +garden or +less):

Compile css file once.

lein garden once

or

lein less once

Automatically recompile css file on change.

lein garden auto

or

lein less auto

Run application:

lein clean
lein figwheel dev

Figwheel will automatically push cljs changes to the browser.

Wait a bit, then browse to http://localhost:3449.

Run tests (if using +test):

lein clean
lein doo phantom test once

The above command assumes that you have phantomjs installed. However, please note that doo can be configured to run cljs.test in many other JS environments (chrome, ie, safari, opera, slimer, node, rhino, or nashorn).

Devcards (if using +devcards)

lein clean
lein figwheel devcards

Figwheel will automatically push cljs changes to the browser.

Wait a bit, then browse to http://localhost:3449/cards.html.


To build a minified version:

lein clean
lein cljsbuild once hostedcards

Then open resources/public/cards.html

Production Build

lein clean
lein cljsbuild once min

Other Templates

There is also a public comparison chart of the common templates.

License

The MIT License (MIT)

Copyright © 2014 Matthew Jaoudi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

More Repositories

1

re-pressed

re-pressed is a clojurescript library that handles keyboard events for re-frame applications.
Clojure
163
star
2

soda-ash

Soda-ash is an interface between clojurescript's Reagent and Semantic UI React
Clojure
152
star
3

rid3

Reagent Interface to D3
Clojure
142
star
4

flutter_test_cookbook

A community driven cookbook with recipes (i.e., examples) on how to test your flutter application.
Dart
126
star
5

baking-soda

baking-soda is an interface between clojurescript's reagent and reactstrap (i.e., bootstrap 4 react components) and react-bootstrap (i.e., bootstrap 3 react components)
Clojure
74
star
6

cljs-todomvc

List of TodoMVC examples that use Clojurescript (om, om next, reagent, re-frame, rum, quiescent, etc.)
Clojure
72
star
7

reagent-seed

Clojurescript template for making Reagent applications with Org-mode (includes figwheel, cider, devcards, doo garden, secretary)
Clojure
63
star
8

breaking-point

BREAKING-POINT lets you quickly define and subscribe to screen (i.e. window) breakpoints in your re-frame application
Clojure
39
star
9

re-surface

Add structure to a reagent or re-frame application at the page level (sticky header, sidebar, modal, etc.)
Clojure
34
star
10

re-pollsive

Re-pollsive is a clojurescript library that handles polling events for re-frame applications
Clojure
34
star
11

gadfly-blog

https://gadfly361.github.io/gadfly-blog/
HTML
4
star
12

reagent-tic-tac-toe

Tic Tac Toe built with Reagent
CSS
2
star
13

reagent-cookbook-template

Template for Reagent Cookbook recipes
Clojure
2
star
14

flutter_services_example

An example Flutter app using "Services" state-management
Dart
1
star