Skip to content

Commit

Permalink
added clean-targets for cljs
Browse files Browse the repository at this point in the history
  • Loading branch information
yogthos committed Mar 13, 2015
1 parent 9c93a03 commit 07675fb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion project.clj
@@ -1,4 +1,4 @@
(defproject luminus/lein-template "2.0.6"
(defproject luminus/lein-template "2.0.7"
:description "a template for creating Luminus applications"
:url "https://github.com/yogthos/luminus-template"
:license {:name "MIT License"
Expand Down
3 changes: 3 additions & 0 deletions src/leiningen/new/cljs.clj
Expand Up @@ -16,6 +16,8 @@
['org.clojure/core.async "0.1.346.0-17112a-alpha"]
['cljs-ajax "0.3.10"]])

(def clean-targets ["resources/public/js"])

(def cljs-dev-dependencies
[['leiningen "2.5.1"]
['figwheel "0.2.5-SNAPSHOT"]
Expand Down Expand Up @@ -58,6 +60,7 @@
(append-options :plugins [['lein-cljsbuild "1.0.4"]])
(append-options :dev-plugins [['lein-figwheel "0.2.3-SNAPSHOT"]])
(append-options :dev-source-paths ["env/dev/clj"])
(update-in [:clean-targets] (fnil into []) clean-targets)
(assoc
:cljs-build (indent root-indent cljs-build)
:figwheel (indent dev-indent (figwheel options))
Expand Down
4 changes: 3 additions & 1 deletion src/leiningen/new/luminus/core/project.clj
Expand Up @@ -43,7 +43,9 @@
:ragtime
<<migrations>>
<% endif %>

<% if clean-targets %>
:clean-targets ^{:protect false} <<clean-targets>>
<% endif %>
<% if cljs-build %>
:cljsbuild
<<cljs-build>>
Expand Down

0 comments on commit 07675fb

Please sign in to comment.