Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ulysses-front/README.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
103 lines (63 sloc)
3.19 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ulysses (front-end) | |
`develop` | |
[![develop Build Status](http://155.37.254.135/api/badges/core/ulysses-front/status.svg?branch=develop)](http://155.37.254.135/core/ulysses-front) | |
`master/prod` [![master Build Status](http://155.37.254.135/api/badges/core/ulysses-front/status.svg?branch=master)](http://155.37.254.135/core/ulysses-front) | |
stack: | |
* language: [clojure](https://clojure.org/) / [clojurescript](https://github.com/clojure/clojurescript) [1] | |
* view: [reagent](http://reagent-project.github.io/) (react interface) | |
* rx / state: [re-frame](https://github.com/day8/re-frame) | |
* routing: [bidi](https://github.com/juxt/bidi) | |
* development environment: [figwheel](https://github.com/bhauman/lein-figwheel) | |
* css: [sass](http://sass-lang.com/) | |
* tests: [doo](https://github.com/bensu/doo) (runner) / [cljs.test](https://github.com/clojure/clojurescript/wiki/Testing) | |
* ci: [drone](https://github.com/drone/drone) [2] | |
[1] definitely use [parinfer](https://shaunlebron.github.io/parinfer/) for clojure development. it makes paren/bracket management truly painless...fun even. available for atom, sublime, vim, etc. | |
[2] NOTE any time `.drone.yml` is changed (even a comment), a new version of `.drone.sec` must be generated. see comment in .drone.yml for more info. | |
## prerequisites | |
* [docker](https://docs.docker.com/engine/installation/) [3] [4] | |
* [java jdk 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) [5] | |
* [leiningen 2](http://leiningen.org/) | |
* [filewatcher](https://github.com/thomasfl/filewatcher) | |
* make | |
optional: | |
* [drone cli tools](http://readme.drone.io/devs/cli/) [6] | |
[3] docker will eventually be the *only* dependency | |
[4] if on mac/windows, you will need to use docker machine / virtual box then source the | |
daemon connection using `eval $(docker-machine env default)` | |
[5] java 7 probably works too, although that doesn't really matter given [3] | |
[6] drone cli tools allow for simulating a drone build though its | |
exec subcommand. can be run with `make build`, then you can just open index.html in a web browser. | |
## make | |
run `make` or `make help` to see available commands | |
## dev build w/ live reloading | |
```sh | |
make start | |
``` | |
figwheel will automatically push cljs and css changes to the browser, | |
as well as run tests (to be configured). | |
wait a bit, then browse to [http://localhost:3449](http://localhost:3449) | |
## sass | |
```sh | |
make sass-watch | |
``` | |
requires filewatcher, see above. | |
watches sass files, then uses sassc in an ephemeral docker container to | |
rebuild when a file changes. also builds sourcemaps. | |
## testing: | |
```sh | |
# npm install -g phantomjs-prebuilt | |
make test # execute tests once and exit | |
make test-watch # execute tests on file changes | |
``` | |
the above command assumes that you have [phantomjs](https://www.npmjs.com/package/phantomjs) installed. however, please note that [doo](https://github.com/bensu/doo) can be configured to run cljs.test in many other js environments (phantom, chrome, ie, safari, opera, slimer, node, rhino, or nashorn). | |
## prod build | |
```sh | |
make build | |
``` | |
this will simulate a drone build locally through `drone exec`. js will be optimized, | |
so it takes a while. | |
## cleanup | |
```sh | |
make clean | |
``` | |
removes compiled css, js, java class files, etc |