private string ApplyFileContentsToMatchedImport(Match match) { var file = FileSystem.ResolveAppRelativePathToFileSystem(match.Groups[2].Value); DependentFiles.Add(file); return(ReadFile(file)); }
private string ProcessImport(string file, string outputFile, string css) { var sourcePath = FileSystem.ResolveFileSystemPathToAppRelative(Path.GetDirectoryName(file)) + "/"; return(IMPORT_PATTERN.Replace(css, match => { var importPath = match.Groups[2].Value; string import; if (importPath.StartsWith("/")) { import = FileSystem.ResolveAppRelativePathToFileSystem(importPath); } else { import = FileSystem.ResolveAppRelativePathToFileSystem(sourcePath + importPath); } DependentFiles.Add(import); return ProcessCssFile(import, outputFile, true); })); }