Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Apr 17, 2012
@kingtim kingtim fix renderer on windows 24d5c16
Commits on Apr 19, 2012
@technomancy technomancy Merge pull request #25 from kingtim/win7
Exception when creating new project on windows
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/leiningen/new/templates.clj
10 src/leiningen/new/templates.clj
@@ -25,8 +25,8 @@
;; these days.
(defn slurp-resource
"Reads the contents of a file on the classpath."
- [file]
- (-> file .getPath io/resource io/reader slurp))
+ [resource-path]
+ (-> resource-path io/resource io/reader slurp))
;; This is so common that it really is necessary to provide a way to do it
;; easily.
@@ -74,10 +74,10 @@
file is simply slurped and the content returned unchanged."
(fn [template & [data]]
- (let [file (io/file "leiningen" "new" name (sanitize template))]
+ (let [path (string/join "/" ["leiningen" "new" name (sanitize template)])]
(if data
- (render-text (slurp-resource file) data)
- (io/resource (.getPath file))))))
+ (render-text (slurp-resource path) data)
+ (io/resource path)))))
;; Our file-generating function, `->files` is very simple. We'd like
;; to keep it that way. Sometimes you need your file paths to be

No commit comments for this range

Something went wrong with that request. Please try again.