public void Dispose() { ConsoleSettings.SetForeGroundColour(ConsoleColor.Green, false); if (GenerateSourceMap) { _output.TrivialWriteLine(string.Format(ArtifactsFactory.SrcMapRefLine, ArtifactsFactory.ConsoleJs)); } ConsoleSettings.SetForeGroundColour(ConsoleColor.Cyan, false); if (WriteWaterMark) { _output.TrivialWriteLine(WaterMark); } ConsoleSettings.SetForeGroundColour(); _output.Dispose(); }
public void SwitchSource(string sourceFileRelPath) { if (_output.IsWriting) { if (GenerateSourceMap) { _output.TrivialWriteLine(string.Format(ArtifactsFactory.SrcMapRefLine, Path.GetFileName(_destPath))); } if (WriteWaterMark) { _output.TrivialWriteLine(WaterMark); } _output.CloseCurrentOutput(); } string sourceFile = Path.GetFileNameWithoutExtension(sourceFileRelPath); _destPath = Path.Combine(_outputDir, sourceFile + ArtifactsFactory.JavaScriptFileExtension); _output.UseJavaScriptOutput(new JavaScriptFileOutput(_destPath)); _output.UseSourceMapOutput(new SourceMapFileOutput(_destPath + ArtifactsFactory.SourceMapFileExtension, sourceFile + ArtifactsFactory.JavaScriptFileExtension)); _output.AddSourceMap(sourceFile); }