Skip to content

Commit

Permalink
Merge pull request #849 from am11/master
Browse files Browse the repository at this point in the history
Compiler: Delete map file when suitable.
  • Loading branch information
madskristensen committed Apr 6, 2014
2 parents 20011f0 + c058263 commit bbbd82a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion EditorExtensions/Shared/Compilers/CssCompilerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ protected override string PostProcessResult(string resultSource, string sourceFi

private string UpdateSourceMapUrls(string content, string compiledFileName)
{
if (!GenerateSourceMap || !File.Exists(compiledFileName))
if (!File.Exists(compiledFileName))
return content;

if (!GenerateSourceMap)
return _sourceMapInCss.Replace(content, string.Empty);

string sourceMapFilename = compiledFileName + ".map";

if (!File.Exists(sourceMapFilename))
Expand Down
3 changes: 3 additions & 0 deletions EditorExtensions/Shared/Compilers/NodeExecutorBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ public async Task<CompilerResult> CompileAsync(string sourceFileName, string tar
finally
{
File.Delete(errorOutputFile);

if (!GenerateSourceMap)
File.Delete(MapFileName);
}
}

Expand Down

0 comments on commit bbbd82a

Please sign in to comment.