Skip to content

Commit 95a4ca9

Browse files
committed
Move Tailwind pipeline to dev and add build hook
1 parent f8998fb commit 95a4ca9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

config.rb

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
# https://middlemanapp.com/advanced/configuration/#environment-specific-settings
55
set :url_root, @app.data.site.host
66

7-
activate :external_pipeline,
8-
name: :tailwindcss,
9-
command: build? ? 'tailwindcss -i source/stylesheets/tailwind.css -o source/stylesheets/site.css --minify' : 'tailwindcss -i source/stylesheets/tailwind.css -o source/stylesheets/site.css --watch',
10-
source: 'source',
11-
latency: 1
127
activate :livereload
138
activate :i18n,
149
mount_at_root: :en,
1510
lang_map: { fr: :acp, de: :solawi }
1611

1712
configure :development do
18-
set :debug_assets, true
13+
set :debug_assets, true
14+
15+
activate :external_pipeline,
16+
name: :tailwindcss,
17+
command: 'tailwindcss -i source/stylesheets/tailwind.css -o source/stylesheets/site.css --watch',
18+
source: 'source',
19+
latency: 1
1920
end
2021

2122
configure :build do
@@ -29,6 +30,11 @@
2930
rules: [{ user_agent: '*', allow: %w[/] }],
3031
sitemap: File.join(@app.data.site.host, 'sitemap.xml')
3132
end
33+
34+
before_build do
35+
system 'tailwindcss -i source/stylesheets/tailwind.css -o source/stylesheets/site.css --minify'
36+
end
37+
3238
activate :inline_svg
3339

3440
helpers do

0 commit comments

Comments
 (0)