sebhoss/bootstrap-clj


Bootstrapping REPL-based Clojure development

License: WTFPL

Language: Clojure


bootstrap-clj

Bootstrapping REPL-based Clojure development.

Usage

The namespace bootstrap.repl offers the following functions:

  • (load-ns-in-dir-aliased dir) Loads all namespaces inside the given directory (recursively).
  • (load-helpers) Loads helper functions for REPL-based work. Includes all of clojure.test such as run-all-tests, all of clojure.repl such as doc, source and all of clojure.tools.namespace.repl such as refresh, etc..
  • (test-shortcut regex) Returns a function which executes all tests matching the given regex.

Example

Place the following in user.clj or a similar file which gets loaded once your REPL session starts. (see bootstraps own bootstrap )

(require '[bootstrap.repl :refer :all])

; Load project namespaces
(load-ns-in-dir-aliased "src/main/clojure")

; 'clojure.test', 'clojure.repl' and 'clojure.tools.namespace.repl' support
(load-helpers)

; shortcut to tests inside project namespaces
(def rat (test-shortcut #"foo.bar.*-test")) ; use (rat) to run all tests

Happy hacking!

Integration

Maven

<dependencies>
  <dependency>
    <groupId>com.github.sebhoss</groupId>
    <artifactId>bootstrap-clj</artifactId>
    <version>[2.0.0,3.0.0)</version>
    <scope>test</scope>
  </dependency>
</dependencies>

Leiningen

[com.github.sebhoss/bootstrap-clj "[2.0.0,3.0.0)" :scope "test"]

License

This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.

Project Statistics

Sourcerank 4
Repository Size 215 KB
Stars 0
Forks 0
Watchers 1
Open issues 0
Dependencies 3
Contributors 1
Tags 4
Created
Last updated
Last pushed

Top Contributors See all

Sebastian Hoß

Packages Referencing this Repo

com.github.sebhoss:bootstrap-clj
Bootstrapping in Clojure.
Latest release 2.0.0 - Updated

Recent Tags See all

bootstrap-clj-2.0.0 September 07, 2013
bootstrap-clj-1.1.0 July 14, 2013
bootstrap-clj-1.0.1 July 10, 2013
bootstrap-clj-1.0.0 July 09, 2013

Something wrong with this page? Make a suggestion

Last synced: 2016-05-27 17:03:31 UTC

Login to resync this repository