https://github.com/codebeige/boot-reset
Boot task for resetting component lifecycle in development.
https://github.com/codebeige/boot-reset
boot boot-tasks clojure component
Last synced: 4 months ago
JSON representation
Boot task for resetting component lifecycle in development.
- Host: GitHub
- URL: https://github.com/codebeige/boot-reset
- Owner: codebeige
- License: mit
- Created: 2017-03-08T11:31:07.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T19:18:11.000Z (almost 9 years ago)
- Last Synced: 2025-08-15T21:18:46.218Z (5 months ago)
- Topics: boot, boot-tasks, clojure, component
- Language: Clojure
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# boot-reset
[](dependency)
```clojure
[codebeige/boot-reset "0.1.3"] ;; latest release
```
[](/dependency)
[Boot][1] task to start [Component][2] 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:
```clj
(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:
```clj
(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`)][3]:
```clj
(deftask dev []
(comp
(watch)
(reset)
(refresh)))
```
## Development
Use the provided `dev` task:
```sh
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.
[1]: https://github.com/boot-clj/boot
[2]: https://github.com/stuartsierra/component
[3]: https://github.com/samestep/boot-refresh