2820b6d3 |
1 | ;;tl;dr AGPLv3+ |
2 | ;;copyright info at bottom |
70ffdd86 |
3 | (ns leiningen.new.flibbertigibbet |
4 | (:require [leiningen.new.templates :refer [renderer name-to-path ->files]] |
5 | [leiningen.core.main :as main])) |
6 | |
7 | (def render (renderer "flibbertigibbet")) |
8 | |
9 | (defn flibbertigibbet |
8a43ca7e |
10 | "create new clojure projects" |
70ffdd86 |
11 | [name] |
12 | (let [data {:name name |
13 | :sanitized (name-to-path name)}] |
731451ad |
14 | (main/info (str "Generating fresh 'lein new' flibbertigibbet project: " |
15 | name)) |
70ffdd86 |
16 | (->files data |
17 | ["src/{{sanitized}}/foo.clj" (render "foo.clj" data)]))) |
2820b6d3 |
18 | |
19 | ;;flibbertigibbet is a lein new flibbertigibbet project-name |
20 | ;;Copyright (C) 2016 daniel watson |
21 | |
22 | ;;This file is part of flibbertigibbet. |
23 | |
24 | ;;flibbertigibbet is free software: you can redistribute it and/or |
25 | ;;modify it under the terms of the GNU Affero General Public License as |
26 | ;;published by the Free Software Foundation, either version 3 of the |
27 | ;;License, or (at your option) any later version. |
28 | |
29 | ;;flibbertigibbet is distributed in the hope that it |
30 | ;;will be useful, but WITHOUT ANY WARRANTY; without even the implied |
31 | ;;warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See |
32 | ;;the GNU General Affero Public License for more details. |
33 | |
34 | ;;You should have received a copy of the GNU Affero General Public License |
35 | ;;along with flibbertigibbet. If not, see |
36 | ;;<http://www.gnu.org/licenses/>. |
37 | |