From 163a9d3f77f8bb980ef7cacb06f6ce51b831c3df Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 3 Jan 2024 20:00:00 +0000 Subject: [PATCH] Rename command --- run | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/run b/run index d2ea62db..545f9db8 100755 --- a/run +++ b/run @@ -3,19 +3,6 @@ set -o nounset set -o pipefail -function build:css { - local args=() - - if [[ "${NODE_ENV:-}" == "production" ]]; then - args=(--minify) - else - args=(--watch) - fi - - npx tailwindcss --content "source/**/*.html.twig" \ - --output source/build/tailwind.css "${args[@]}" -} - function clean { rm -fr node_modules/ output_*/ source/build/ vendor/ } @@ -42,5 +29,18 @@ function help { printf "\nExtended help:\n Each task has comments for general usage\n" } +function npm:build:css { + local args=() + + if [[ "${NODE_ENV:-}" == "production" ]]; then + args=(--minify) + else + args=(--watch) + fi + + npx tailwindcss --content "source/**/*.html.twig" \ + --output source/build/tailwind.css "${args[@]}" +} + TIMEFORMAT="Task completed in %3lR" time "${@:-help}"