Skip to content

Loading…

added resources dir and resources-readme.md for app and default #51

Closed
wants to merge 1 commit into from

3 participants

@uvtc

re. issue #50

@Raynes
Owner

What is this readme for?

@uvtc

If I'd just done lein new my-proj; cd my-proj and then thought, "oh, a resources directory ... wonder why I'd need that...", I'd be pleasantly surprised to find that readme in there telling me what a resources dir is useful for (including those other useful nuggets of info).

I also think it's a good chance to provide on-the-spot guidance to folks on where to keep some of their project contents --- especially for those coming from languages other than Java.

@uvtc

Also it wasn't obvious to me how to have lein-newnew create just an empty directy with nothing in it.

Also though, it seemed to me just a tiny bit odd to have that resources dir sitting there with nothing in it.

If you decide to just create an empty resources dir and not use that little document in it, I'll go find a place in the lein docs where I can put that info. I poked around in the lein docs and didn't immediately see anything there about a resources dir.

@Raynes
Owner

I'm concerned that it'll result in people committing it. You could add it to .gitignore, but I really don't like to have stuff like this created. I'm also against the doc/ directory as well, since 99% of people using the template wont use it.

That said, I'll let @technomancy decide.

@technomancy
Collaborator

I think a .mkdir call from the template code is the way to go here. The lein tutorial is where people should be learning about project layout.

@Raynes Raynes closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 16, 2012
  1. added resources dir and resources-readme.md to that dir for app and d…

    John Gabriele committed
    …efault
View
1 src/leiningen/new/app.clj
@@ -18,5 +18,6 @@
["README.md" (render "README.md" data)]
["doc/intro.md" (render "intro.md" data)]
[".gitignore" (render "gitignore" data)]
+ ["resources/resources-readme.md" (render "resources-readme.md" data)]
["src/{{nested-dirs}}/core.clj" (render "core.clj" data)]
["test/{{nested-dirs}}/core_test.clj" (render "test.clj" data)])))
View
4 src/leiningen/new/app/resources-readme.md
@@ -0,0 +1,4 @@
+Put into this directory any miscellaneous resource files that your
+program may need. This resources directory is on the classpath.
+`clojure.java.io/resource` can locate files in here. When you create a
+jar or uberjar, files herein will be included in that jar.
View
1 src/leiningen/new/default.clj
@@ -21,5 +21,6 @@ Accepts a group id in the project name: `lein new foo.bar/baz`"
["README.md" (render "README.md" data)]
["doc/intro.md" (render "intro.md" data)]
[".gitignore" (render "gitignore" data)]
+ ["resources/resources-readme.md" (render "resources-readme.md" data)]
["src/{{nested-dirs}}/core.clj" (render "core.clj" data)]
["test/{{nested-dirs}}/core_test.clj" (render "test.clj" data)])))
View
4 src/leiningen/new/default/resources-readme.md
@@ -0,0 +1,4 @@
+Put into this directory any miscellaneous resource files that your
+program may need. This resources directory is on the classpath.
+`clojure.java.io/resource` can locate files in here. When you create a
+jar or uberjar, files herein will be included in that jar.
Something went wrong with that request. Please try again.