how to load ns by default when starting repl

前端 未结 2 2076
野性不改
野性不改 2021-01-04 03:42

I am using lein2. I would like to load some ns by default when the repl starts. Is it possible to either specify in project.clj the ns that should be loaded, when lein2 repl

2条回答
  •  粉色の甜心
    2021-01-04 04:24

    I sometimes use the :injections option in project.clj to load namespaces. The following example will load the foo.bar namespace when the lein2 command is executed:

    (defproject org.example/sample "0.1.0-SNAPSHOT"
      :description "A sample project"
      :url "http://example.com/FIXME"
      :license {:name "Eclipse Public License"
                :url "http://www.eclipse.org/legal/epl-v10.html"}
      :injections [(use 'foo.bar)])
    

提交回复
热议问题