I
I
Ivan2014-08-13 22:16:45
symfony
Ivan, 2014-08-13 22:16:45

How to develop frontend on less in symfony?

Switching from Yii to Symfony. I use less, the compiler connected it as an assetic filter:

{% stylesheets filter='less,uglifycss,cssrewrite' combine=true
    '@AcmeFrontendBundle/Resources/public/styles/less/frontend.less' %}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}

The question is: what is the most convenient way to develop the frontend so that you need to perform a minimum of actions to view the result of editing less files. Now, after every minimal edit and saving the less file via ftp, I have to execute 3 commands in the console so that the styles compile and update the cache:
app/console cache:clear --env=dev
app/console assetic:dump --env=dev
chown -R ivan:ivan /home/ivan // необходима, т.к. предыдущие команды выполняю под другим пользователем

In Yii, the compiler was installed as a separate extension that compiled the necessary less files if their last modification time changed. How to do in Symfony also? How do you generally work with sass/less in Symfony? Maybe compilation on the developer's side (for example, in PhpStorm) is better?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2014-08-13
@0neS

I immediately push the minified css - the backend is not aware at all that I am using a preprocessor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question