An open API service indexing awesome lists of open source software.

https://github.com/torgeir/boot-figwheel-example

An example project compiling cljs with boot and running figwheel for hot reloading code. Client and server-side use of rum.
https://github.com/torgeir/boot-figwheel-example

boot clj cljs figwheel isomorphic rum

Last synced: 3 months ago
JSON representation

An example project compiling cljs with boot and running figwheel for hot reloading code. Client and server-side use of rum.

Awesome Lists containing this project

README

          

# boot+figwheel example

A boot+figwheel example, that hot reloads cljs and less. Client and server-side use of rum.

## prerequisits

Install [`boot`](https://github.com/boot-clj/boot#install)!

## run/watch

```
boot dev
```

## hot reload cljs and css

- visit `http://localhost:8080`
- change `core.cljs` to watch the js reload!
- change `app.main.less` to watch the css reload!

## connect the cljs browser repl

- connect to the repl server (e.g. with `cider-connect` in emacs, or [like this
in cursive](https://cursive-ide.com/userguide/repl.html#remote-repls). The port
number is logged when you run `boot dev`.)
- at the prompt `boot.user>` type `(boot-figwheel/cljs-repl)`
- type `(js/alert "woah!")` to watch an alert box pop open in the browser
- woah!

## useful boot tasks

Build a single composed task, e.g. to build a jar file

```sh
boot dist
```

Show help for a task, e.g. the `target` task

```sh
boot target -h
```

Run a single task and pipe the resulting file set to `target/`

```sh
boot less -- target --no-clean
```

Build, serve the `target/public` folder, and keep the server up with the `wait` task

```sh
boot build -- serve -d target/public -- wait
```