Home | About | Documentation | Discuss

Module: bract.dev

Clojars coordinates: [bract/bract.dev "0.6.0-0.1.0"]

Installation

Create a file dev/user.clj in your project as follows:

(ns user
  (:require
    [bract.core.dev   :refer [start stop verbose config]]
    [bract.dev.reload :refer [go reinit reset restart]]))

Now when you setup your project (see below) and start the REPL you will have access to the user namespace vars.

At the REPL (ensure user=> prompt) you can run:

Leiningen users

Add dependency in the dev profile of your project.clj:

:profiles {:dev {:dependencies [bract/bract.dev "<version>"]
                 :source-paths ["dev"]}}

Note: If you have a :main entry in project.clj, move it to the uberjar profile.

Boot users

Add dependency in a dev task.

;; in a dev task
(set-env!
  :source-paths #{"dev"}
  :dependencies '[[bract/bract.dev "<version>"]])

Keys

This module does not expose any context/config keys.

Inducers

This module does not expose any inducers.

Entry points

This module exposes several functions as entry point for REPL based interactive development. These functions are available in the bract.dev.reload namespace:

Function call Description
(reinit) De-init application, then code reload followed by init
(reset) Stop application, followed by re-init
(go) Same as (reset)
(restart) Stop application, then re-init followed by starting app

Fork me on GitHub