talking-drupal-tailwindcss/run

23 lines
450 B
Plaintext
Raw Permalink Normal View History

2022-06-07 21:00:00 +00:00
#!/bin/bash
function yarn:build:css {
# Build the CSS assets, this is intended to be run within the "assets" container.
local args=()
if [[ "$NODE_ENV" == "development" ]]; then
args=(--watch)
else
args=(--minify)
fi
tailwindcss \
--config assets/tailwind.config.js \
--content "templates/**/*.html.twig" \
--input assets/css/tailwind.css \
--output public/build/tailwind.css \
"${args[@]}"
}
eval "${@}"