Skip to content

Boot task for resetting component lifecycle in development.

License

Notifications You must be signed in to change notification settings

codebeige/boot-reset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Boot task for resetting component lifecycle in development.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published