I’m converting LESS to CSS via an ant build script. I want to only convert a LESS file if I haven’t already converted that file previously.
How do I check one folder for the CSS file and then exclude that LESS file from the fileset?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You didn’t say how you’re converting the files, but assuming you have a conversion task that operates on a fileset, you’d need a depend selector, something like this:
That will only include .less files under the
lessdirectory that don’t have a corresponding .css file in thecssdirectory. In addition, if a .less file is newer than the corresponding .css file it will be included in the fileset for conversion.