public async static Task <CssSourceMap> Create(string targetFileContents, string mapFileContents, string directory, IContentType contentType) { CssSourceMap map = new CssSourceMap(); await Task.Run(() => map.Initialize(targetFileContents, mapFileContents, directory, contentType)); return(map); }
public async static Task<CssSourceMap> Create(string targetFileContents, string mapFileContents, string directory, IContentType contentType) { CssSourceMap map = new CssSourceMap(); await Task.Run(() => map.Initialize(targetFileContents, mapFileContents, directory, contentType)); return map; }
public async static Task<CssSourceMap> Create(string targetFileContents, string mapFileContents, string directory, IContentType contentType) { CssSourceMap map = new CssSourceMap(); map.MapNodes = Enumerable.Empty<CssSourceMapNode>(); if (WESettings.Instance.ForContentType<ICssSourceMapSettings>(contentType).ProcessSourceMapsForEditorEnhancements) await Task.Run(() => map.Initialize(targetFileContents, mapFileContents, directory, contentType)); return map; }
public async static Task <CssSourceMap> Create(string targetFileContents, string mapFileContents, string directory, IContentType contentType) { CssSourceMap map = new CssSourceMap(); map.MapNodes = Enumerable.Empty <CssSourceMapNode>(); if (WESettings.Instance.ForContentType <ICssSourceMapSettings>(contentType).ProcessSourceMapsForEditorEnhancements) { await Task.Run(() => map.Initialize(targetFileContents, mapFileContents, directory, contentType)); } return(map); }
public static CssCompilerResult GenerateResult(string sourceFileName, string targetFileName, string mapFileName, bool isSuccess, string result, string resultMap, IEnumerable <CompilerError> errors, string rtlSourceFileName, string rtlTargetFileName, string rtlMapFileName, string rtlResult, string rtlResultMap, bool hasSkipped = false) { CssCompilerResult compilerResult = new CssCompilerResult(sourceFileName, targetFileName, mapFileName, isSuccess, result, resultMap, errors, hasSkipped, rtlSourceFileName, rtlTargetFileName, rtlMapFileName, rtlResult, rtlResultMap); if (mapFileName == null) { return(compilerResult); } string extension = Path.GetExtension(sourceFileName).TrimStart('.'); compilerResult.SourceMap = CssSourceMap.Create(result, resultMap, Path.GetDirectoryName(targetFileName), Mef.GetContentType(extension)); return(compilerResult); }
public async static Task <CssCompilerResult> GenerateResult(string sourceFileName, string targetFileName, string mapFileName, bool isSuccess, string result, IEnumerable <CompilerError> errors) { CssCompilerResult compilerResult = new CssCompilerResult(sourceFileName, targetFileName, isSuccess, result, errors); if (mapFileName == null) { return(null); } var extension = Path.GetExtension(sourceFileName).TrimStart('.'); compilerResult.SourceMap = CssSourceMap.Create(await FileHelpers.ReadAllTextRetry(targetFileName), await FileHelpers.ReadAllTextRetry(mapFileName), Path.GetDirectoryName(targetFileName), Mef.GetContentType(extension)); return(compilerResult); }
private CssCompilerResult(string sourceFileName, string targetFileName, string mapFileName, bool isSuccess, string result, IEnumerable<CompilerError> errors) : base(sourceFileName, targetFileName, isSuccess, result, errors) { var extension = Path.GetExtension(sourceFileName).TrimStart('.'); SourceMap = new CssSourceMap(targetFileName, mapFileName, Mef.GetContentType(extension)); }