C# Class Cruncher.Preprocessors.ResourcePreprocessor

Provides methods to replace relative resource paths within a stylesheet with absolute paths.
Inheritance: IPreprocessor
Exibir arquivo Open project: JimBobSquarePants/Cruncher

Public Methods

Method Description
Transform ( string input, string path, CruncherBase cruncher ) : string

Transforms the content of the given string by replacing relative paths.

Private Methods

Method Description
GetAbsolutePathFromRelative ( string sourceDirectory, string relativePath ) : string

Returns the absolute path to the relative resource.

GetRelativePaths ( string input ) : IEnumerable

Returns a distinct enumerable collection of relative paths from the css file.

ReplaceRelativePathsIn ( string css, string oldPath, string newPath ) : string

Replaces the relative paths in the given css content.

RewritePaths ( string input, string path ) : string

Rewrites the relative path as relative to the application root.

Method Details

Transform() public method

Transforms the content of the given string by replacing relative paths.
public Transform ( string input, string path, CruncherBase cruncher ) : string
input string The input string to transform.
path string The path to the given input string to transform.
cruncher CruncherBase The cruncher that is running the transform.
return string