Output Filename Requirement

Jan 26, 2009 at 7:45 AM
Hey - Congs on a Great project! Just one small suggestion, the requirement of adding the output file to JS or CSS task seems to be retundent if only one file is compressed. I need to compress each file in a given directory and since it has a lot of JS files writing the name both in input and output file dosent makes a lot of sense if i do not plan to combine any file. I made a small fix in your source to handle this case for me. In CompressTask.cs, checked if only one input file and no output file is not defined.

else if (!string.IsNullOrEmpty(this.JavaScriptFiles) &&
                IList<string> Files = ParseFiles(this.JavaScriptFiles);
                if (Files != null && Files.Count == 1)
                    this.JavaScriptOutputFile = this.JavaScriptFiles;
                    this.DeleteJavaScriptFiles = "false";
                    Log.LogError("Vibhore: The javascript outfile is required if more than one javascript input files have been defined.");
                    return false;

All the best!
Vibhore Goyal
Feb 26, 2009 at 3:40 AM
Edited Feb 26, 2009 at 3:41 AM
read this thread here about how to do that.