How can I force assetic to render assets each time the page is reloaded (no matter if assets are modified or not)?
More explanation about my issue:
I\'m curr
I've created a simple script to solve this problem. Please try it out and let me know if it helped.
#!/bin/bash
# assetic-watch: A very simple shell-script to recursively and efficiently
# watch for asset changes and to trigger automatic recompilation.
#
# By Slava Fomin II
# Feel free to contact me.
# From Russia with Love.
# Let's make this World a Better place!
# --------------------------------------
#===============#
# CONFIGURATION #
#===============#
# Path relative to "Symfony/src" directory.
# File changes under specified directory will trigger recompilation
# of all assets.
WATCH_PATH="Name/Bundle/NameBundle/Resources/public/css"
# Environment.
ENV="dev"
# Additional options for "app/console".
OPTS=""
# inotifywait events to watch for.
INW_EVENTS="close_write,moved_to,create"
# Optional inotifywait arguments.
INW_OPTS=""
# Relative path to the Symfony root directory.
SYMFONY_PATH="../"
#============#
# PROCESSING #
#============#
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CONSOLE_PATH="$SCRIPT_DIR/${SYMFONY_PATH}/app/console"
SRC_PATH="$SCRIPT_DIR/${SYMFONY_PATH}/src/$WATCH_PATH"
quietly() { "$@" > /dev/null 2>&1; }
while true; do
quietly inotifywait --recursive -e $INW_EVENTS $INW_OPTS $SRC_PATH
php $CONSOLE_PATH assetic:dump --env=$ENV $OPTS
done
I really hope Symfony developers will address this issue in the future versions of the Assetic bundle. I believe it's a serious limitation.