public override bool Execute() { var files = new List<string>(); if (RequireConfigs != null) { files = RequireConfigs.Select(r => r.GetMetadata("FullPath")).ToList(); } var entryPointOveride = string.Empty; if (EntryPointOverride != null) { entryPointOveride = EntryPointOverride.GetMetadata("FullPath"); } this.configProcessor = ConfigProcessorFactory.Create(AutoCompressor, ProjectPath, PackagePath, entryPointOveride, files, FileHelpers.ParseEncoding(EncodingType)); var bundles = new List<Bundle>(); try { bundles = this.configProcessor.ParseConfigs(); } catch (Exception ex) { Log.LogErrorFromException(ex); return false; } if (bundles.Any()) { EnsureOutputDirectoriesExist(bundles); var compressor = new JavaScriptCompressor { Encoding = FileHelpers.ParseEncoding(EncodingType) }; foreach (var bundle in bundles) { if (!bundle.Files.Any()) { continue; } var taskEngine = new CompressorTaskEngine(new MsBuildLogAdapter(Log), compressor) { CompressionType = CompressionType, DeleteSourceFiles = false, EncodingType = EncodingType, LineBreakPosition = -1, LoggingType = LoggingType, OutputFile = bundle.Output, SourceFiles = bundle.Files.ToArray() }; taskEngine.Execute(); } } return true; }