Exemplo n.º 1
0
        public SingleFileArtifacts(string outputDir, string outputFile)
        {
            _destPath = Path.Combine(outputDir, outputFile);

            _output = new ArtifactOutput();
            _output.UseJavaScriptOutput(new JavaScriptFileOutput(_destPath));
            _output.UseSourceMapOutput(new SourceMapFileOutput(_destPath + ArtifactsFactory.SourceMapFileExtension, outputFile));
        }
Exemplo n.º 2
0
        public SingleFileArtifacts(string outputDir, string outputFile)
        {
            _destPath = Path.Combine(outputDir, outputFile);

            _output = new ArtifactOutput();
            _output.UseJavaScriptOutput(new JavaScriptFileOutput(_destPath));
            _output.UseSourceMapOutput(new SourceMapFileOutput(_destPath + ArtifactsFactory.SourceMapFileExtension, outputFile));
        }
Exemplo n.º 3
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.º 4
0
 public ConsoleArtifacts()
 {
     _output = new ArtifactOutput();
     _output.UseJavaScriptOutput(new JavaScriptConsoleOutput());
     _output.UseSourceMapOutput(new SourceMapConsoleOutput(ArtifactsFactory.ConsoleJs));
 }
Exemplo n.º 5
0
 public ConsoleArtifacts()
 {
     _output = new ArtifactOutput();
     _output.UseJavaScriptOutput(new JavaScriptConsoleOutput());
     _output.UseSourceMapOutput(new SourceMapConsoleOutput(ArtifactsFactory.ConsoleJs));
 }