Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add section showing how to use as a Symfony CLI worker #41

Merged
merged 1 commit into from
Dec 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://symfony.com/download>`_, you can add build
command as a `worker <https://symfony.com/doc/current/setup/symfony_server.html#configuring-workers>`_
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?
-----------------

Expand Down Expand Up @@ -167,4 +188,4 @@ set ``binary_version`` option:
.. code-block:: yaml
# config/packages/symfonycasts_tailwind.yaml
symfonycasts_tailwind:
binary_version: 'v3.3.0'
binary_version: 'v3.3.0'