uxbox/uxbox-old

Name: uxbox-old

Owner: uxbox

Description: UXBox front-end application.

Created: 2015-06-18 17:35:36.0

Updated: 2017-05-31 00:53:07.0

Pushed: 2015-12-29 22:27:42.0

Homepage:

Size: 2646

Language: Clojure

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

UXBox

Travis Badge Travis Badge

Development
Frontend

Grab the code and run:

in with-profile +front figwheel

This will compile ClojureScript whenever you make changes and serve the application in localhost. Open the page.

ClojureScript browser-connected REPL

The aforementioned command also starts a nrepl (network REPL) in the port 7888.

You can connect to it from a shell using the following command:

in repl :connect 7888

In Emacs you can use cider's M-x cider-connect command and tell it that nREPL is running on localhost:7888 to connect.

After connecting to nREPL, run the following Clojure code in it:

> (use 'figwheel-sidecar.repl-api)
> (cljs-repl)

After that, a figwheel message will appear and the prompt will change to cljs.user>. We can now evaluate ClojureScript in the browser from the REPL.

Static resources generation

The project's static resources are processed using gulp. First of all, install the npm dependencies running:

install

To start watching the files and process them with each change, run:

run watch

To process the resources just once, run:

run dist
Testing

For running the tests from a shell, run the following command:

in cljsbuild once test

If you want to run the tests from a ClojureScript REPL, you can do it like so (given that you want to run the tests contained in the uxbox.core-test namespace):

.user> (require '[cljs.test :as t])
.user> (t/run-tests 'uxbox.core-test)

Note that the test output will appear in the browser and in the shell where you launched the lein fighweel command.

Transformation from HTML to hiccup

For transforming the generated HTMLs to hiccup form, execute the following command:

in with-profile +front hicv 2clj resources/public/templates/*.html

The .clj files in the hicv directory will contain the hiccup versions of the HTML templates.

Backend
REPL

You can start a Clojure REPL with the following command:

in repl

In Emacs you can use cider's M-x cider-jack-in command in the proyect directory to have a REPL in your editor.

Testing

For running the tests from a shell, run the following command:

in test

If you want to run the tests from a Clojure REPL, you can do it like so (given that you want to run the tests contained in the uxbox.core-test namespace):

> (require '[clojure.test :as t])
> (t/run-tests 'uxbox.core-test)
License

TODO


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.