Skip to content

Commit

Permalink
Add badge and more motivation
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcompton committed Mar 31, 2019
1 parent 0a8df67 commit acde0ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# defn-spec

[![CircleCI](https://circleci.com/gh/danielcompton/defn-spec.svg?style=svg)](https://circleci.com/gh/danielcompton/defn-spec)
[![CircleCI](https://circleci.com/gh/danielcompton/defn-spec.svg?style=svg)](https://circleci.com/gh/danielcompton/defn-spec) [![Clojars Project](https://img.shields.io/clojars/v/net.danielcompton/defn-spec-alpha.svg)](https://clojars.org/net.danielcompton/defn-spec-alpha)

defn-spec lets you create Clojure Specs inline with your `defn`. The syntax (and implementation) has been borrowed from [Schema](https://github.com/plumatic/schema), so if you've used that before, this should be very familiar.

Expand Down Expand Up @@ -82,6 +82,8 @@ I've been using Clojure spec for a while, but I found that I often resisted writ

I created defn-spec to increase the locality of the spec definitions, and to reduce the activation energy to start adding specs to your codebase. I wanted to make something that was small enough to drop into any project or library I worked on.

defn-spec doesn't introduce any concepts or features to spec. The only deviation from vanilla spec is that defn-spec will automatically build the `s/cat` form for you from the arguments that you provide.

## Alternatives

* Orchestra has a [defn-spec](https://github.com/jeaye/orchestra#defn-spec) macro. Cursive doesn't yet have support for this macro though, and it requires you to provide specs for every function argument. Orchestra is great though, and I recommend everyone check it out, especially for instrumenting their `:ret` and `:fn` specs.
Expand Down

0 comments on commit acde0ae

Please # to comment.