Skip to content

Commit

Permalink
feat: allow :postcss/conifg in build config.
Browse files Browse the repository at this point in the history
Introduces the ability to configure postcss directly with `:postcss/config`.
  • Loading branch information
rschmukler committed May 9, 2021
1 parent 12f749f commit 02f9d30
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/teknql/tailwind.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
(:import [java.nio.file Files]
[java.nio.file.attribute FileAttribute]))

(def default-config
(def default-tailwind-config
"Default tailwind config"
{:future {}
:purge []
Expand Down Expand Up @@ -63,8 +63,9 @@
:devtools
:http-root)
tmp-dir (create-tmp-tailwind-project!
{:plugins {:tailwindcss {}}}
(merge default-config
(merge {:plugins {:tailwindcss {}}}
(cfg-get config :postcss/config nil))
(merge default-tailwind-config
{:purge [(str http-root "/**/*.js")
(str http-root "/**/*.html")]}
(cfg-get config :tailwind/config nil)))]
Expand Down Expand Up @@ -92,10 +93,11 @@
:devtools
:http-root)
tmp-dir (create-tmp-tailwind-project!
{:plugins {:tailwindcss {}
:autoprefixer {}
:cssnano {:preset "default"}}}
(merge default-config
(merge {:plugins {:tailwindcss {}
:autoprefixer {}
:cssnano {:preset "default"}}}
(cfg-get config :postcss/config nil))
(merge default-tailwind-config
{:purge [(str http-root "/**/*.js")
(str http-root "/**/*.html")]}
(cfg-get config :tailwind/config nil)))]
Expand Down

0 comments on commit 02f9d30

Please sign in to comment.