Forgot to add, you can then run `lein repl` from my-proj as usual, and have easy access to your library code:
~~~ $ cd ~/dev/my-proj $ lein repl > my-proj.core=> (my/foo 4) 4 Hello, World! nil ~~~ On Thursday, March 12, 2015 at 11:58:53 AM UTC-4, John Gabriele wrote: > > Hi Cecil, > > I think what you want to do is create a library project to house your > common code, install the library to your local repository, then use it from > your project: > > ~~~ > cd ~/dev > lein new my-stuff/my-lib > cd my-lib > # edit src/my_stuff/my_lib.clj , adding your common code here > lein install > > # Ok, that library is now ready to use from your project. > cd ~/dev > lein new app my-proj > cd my-proj > # edit project.clj to have `[my-stuff/my-lib "0.1.0-SNAPSHOT"]` in > :dependencies > # edit src/my_proj/core.clj to have `(:require [my-stuff.my-lib :as my)` in > # the ns macro at the top > # do something like `(my/foo 3)` from inside `-main`. > lein run > ~~~ > > -- John > > > > On Thursday, March 12, 2015 at 4:10:27 AM UTC-4, Cecil Westerhof wrote: >> >> I have some files in: >> ~/Clojure >> that I want to use in a project I start with: >> lein repl >> >> But I do not see how to do this. How can I acomplish this? >> >> -- >> Cecil Westerhof >> > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.