Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public void SwitchSource(string sourceFileRelPath)
 {
     _output.AddSourceMap(sourceFileRelPath);
 }