build(docker): use Tailwind CLI for generating CSS

This commit is contained in:
Oliver Davies 2021-12-28 02:15:08 +00:00
parent 84963c8a31
commit 29014d1c56
11 changed files with 89 additions and 4199 deletions

16
run
View file

@ -116,7 +116,21 @@ function task:test:unit {
function run-tests {
# Run PHPUnit tests.
docker-compose run php --user ${DOCKER_WEB_USER} php phpunit "${@}"
docker-compose run --rm php --user ${DOCKER_WEB_USER} php phpunit "${@}"
}
function task:yarn:build:css {
# Build CSS assets, this is meant to be run from within the assets container.
local args=()
if [ "${NODE_ENV}" == "production" ]; then
args=(--minify)
else
args=(--watch)
fi
tailwindcss --postcss --input assets/css/tailwind.pcss \
--output build/app.css "${args[@]}"
}
eval "task:${@:-help}"