diff --git a/README.md b/README.md index cbcdc5d..50d1372 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Make sure you have the [latest version of leiningen installed](https://github.co --react Adds a bare bones React app, including Sablono. --reagent Adds a bare bones Reagent app. --rum Adds a bare bones Rum app. - +no-bundle Generates a project without npm and webpack support. + +bundle Generates a project with npm and webpack support. Include the options using `--` to separate them from Leiningens options, like so diff --git a/project.clj b/project.clj index e956923..020e0e7 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject figwheel/lein-template "0.5.20-4" +(defproject figwheel/lein-template "0.5.20-5" :description "A Leinigen template for figwheel" :url "https://github.com/bhauman/figwheel-template" :license {:name "Eclipse Public License" diff --git a/src/leiningen/new/figwheel.clj b/src/leiningen/new/figwheel.clj index 305aad2..5444943 100644 --- a/src/leiningen/new/figwheel.clj +++ b/src/leiningen/new/figwheel.clj @@ -47,7 +47,7 @@ (def framework-opts (set (map #(str "--" %) supported-frameworks))) -(def supported-attributes #{"no-bundle"}) +(def supported-attributes #{"bundle"}) (def attribute-opts (set (map #(str "+" %) supported-attributes))) @@ -84,7 +84,7 @@ --react which adds a minimal Ract application in core.cljs --reagent which adds a minimal Reagent application in core.cljs --rum which adds a minimal Rum application in core.cljs - +no-bundle don't include npm bundle support + +bundle include npm bundle support Only one option can be specified at a time. If no option is specified, nothing but a print statment is added in core.cljs" [name & opts] @@ -94,7 +94,7 @@ (str "Cannot name a figwheel project \"figwheel\" the namespace will clash.\n" "Please choose a different name, maybe \"tryfig\"?"))) (let [{:keys [framework attributes]} (parse-opts opts) - bundle? (not (get attributes :no-bundle)) + bundle? (get attributes :bundle false) data {:name name :sanitized (name-to-path name) :react? (= :react framework)