reagent-project / reagent-template

A Leiningen template for projects using Reagent.
MIT License
394 stars 55 forks source link

:minify-assets has the wrong syntax #160

Closed kengruven closed 5 years ago

kengruven commented 5 years ago

In this project's file "reagent-template/resources/leiningen/new/reagent/project.clj", the :minify-assets key currently looks like this:

  :minify-assets
  {:assets
   {"resources/public/css/site.min.css" "resources/public/css/site.css"}}

When I try to lein ring uberwar, it fails with a NullPointerException, because this is not in the syntax that lein-asset-minifier expects. The example from lein-asset-minifier's README is:

:minify-assets [[:html {:source "dev/resource/html" :target "dev/minified/html"}]
                [:css {:source "dev/resources/css" :target "dev/minified/css/styles.min.css"}]
                [:js {:source ["dev/res/js1", "dev/res/js2"] :target "dev/minified/js/script.min.js"}]]

Changing the reagent-template's :minify-assets key to:

  :minify-assets
  [[:css {:source "resources/public/css/site.css"
          :target "resources/public/css/site.min.css"}]]

fixes it.

yogthos commented 5 years ago

Thanks for the heads up. I just pushed out a new template with updated lein-asset-minifier, reitit, and the fix for this issue.

kengruven commented 5 years ago

Thanks — a super fast response!