From 4d78478c9f2552434b47d2dd3502a21fa22c71b7 Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Wed, 20 Dec 2023 15:34:02 -0500 Subject: [PATCH] doc: add section showing how to use as a Symfony CLI worker --- doc/index.rst | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/doc/index.rst b/doc/index.rst index 6c44a89..6341bf5 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -54,6 +54,27 @@ That's it! This will watch for changes to your ``assets/styles/app.css`` file and automatically recompile it when needed. If you refresh the page, the final ``app.css`` file will already contain the compiled CSS. +Symfony CLI +~~~~~~~~~~~ + +If using the `Symfony CLI `_, you can add build +command as a `worker `_ +to be started whenever you run ``symfony server:start``: + +.. code-block:: yaml + + # .symfony.local.yaml + workers: + # ... + + tailwind: + cmd: ['symfony', 'console', 'tailwind:build', '--watch'] + +.. tip:: + + If running ``symfony server:start`` as a daemon, you can run + ``symfony server:log`` to tail the output of the worker. + How Does It Work? ----------------- @@ -167,4 +188,4 @@ set ``binary_version`` option: .. code-block:: yaml # config/packages/symfonycasts_tailwind.yaml symfonycasts_tailwind: - binary_version: 'v3.3.0' \ No newline at end of file + binary_version: 'v3.3.0'