Skip to content

Latest commit

 

History

History
66 lines (45 loc) · 1.34 KB

README.md

File metadata and controls

66 lines (45 loc) · 1.34 KB

boot-reset

[codebeige/boot-reset "0.1.3"] ;; latest release

Boot task to start Component lifecycle on first run and subsequently do a reset on file changes.

  • Provides the reset task
  • Performs arbitrary side effects before and after wrapped handlers
  • Triggers on file changes optionally filtered by pattern

Usage

Add dependency to build.boot and require the task:

(set-env! :dependencies '[[codebeige/boot-reset "RELEASE" :scope "test"]])

(require '[codebeige.boot-reset :refer [reset]])

Provide symbols referring to the functions that should be run as options:

(task-options!
 reset {:start 'dev/start
        :stop  'dev/stop
        :files #{#"\.cljc?$"}})

Add the task to your development pipeline after watch and before any tasks that should be wrapped (e.g. refresh):

(deftask dev []
  (comp
   (watch)
   (reset)
   (refresh)))

Development

Use the provided dev task:

boot dev

This will start up an interactive development environment that will reinstall the boot-reset jar locally on every file change.

License

Copyright (c) 2017 Tibor Claassen. Distributed under the MIT License.