Can someone give me an example of how to use Phing's UpToDateTask
with a
mapper? I can't figure it out and I can't find any examples on the net.
Here's what I am trying to achieve. I have a bunch of SCSS files that I
convert to CSS using the ExecTask
and Ruby's SASS parser. But, I only
want to regenerate the CSS files if any of the source files have changed.
The source SCSS files are in app/assets/css
and the compiled files are
placed in app/webroot/css
. How can I use the UpToDateTask
to test if any
of the files in app/assets/css
are newer than any of the files in
app/webroot/css
?
Note that the SASS comilation does not have a 1-to-1 filename mapping to
CSS files. There could be a dozen SCSS files that in the end get
compiled into 3-4 CSS files. I know I could simply hard-code those CSS files into my build.xml
but I would like to create a more generic, re-usable build target.
Thanks in advance!