Fork me on GitHub
#clojuredesign-podcast
<
2019-07-16
>
nate00:07:57

@deleted-user we usually put them under the dev/ directory

nate00:07:29

We include the dev path when running lein repl and then yeah load them in via the editor or tools.namespace refresh.

nate00:07:07

An example project would be very useful. I totally agree.

neumann00:07:24

@deleted-user Definitely somewhere in a development path so they don't get compiled into the app or uberjar. Like @nate mentioned, our default choice is dev/fiddle.

neumann00:07:46

Thanks for the feedback. I like the idea of doing a demo video.

neumann00:07:34

Ah yes. lein has tons of options. What I mean by "dev path" is a path that is only included when you run the repl. In lein, that would be the :dev profile. Let me get an example....

neumann00:07:33

So I have this inside my project.clj file:

:profiles
  {:uberjar
   {:aot :all}

   :dev
   {:resource-paths ^:replace
    ["dev" "resources"]

    :plugins
    [[lein-ancient "0.6.15"]
     [jonase/eastwood "0.2.6"]]

    :dependencies
    [[org.clojure/tools.namespace "0.2.11"]
     [com.stuartsierra/component.repl "0.2.0"]]

    :eastwood
    {:add-linters [:keyword-typos :unused-namespaces :unused-private-vars]}
    }})

neumann00:07:49

Note the :dev profile with the "dev" path.

neumann00:07:08

When you run lein repl, it automatically includes any settings in the :dev profile.

neumann00:07:17

I'm pretty sure component.repl pulls it in, but just in case. 🙂

neumann00:07:17

@nate Did that for the LA meetup.

neumann00:07:14

Ah yes. It's "just another" source path. Same structure as "src".

neumann00:07:36

It's incredibly useful that Clojure can take more than one source path and merge the all together.

neumann00:07:43

I didn't realize that for a long time myself.