C# Class Cruncher.CruncherBase

The cruncher base. Inherit from this to implement your own cruncher.
Exibir arquivo Open project: JimBobSquarePants/Cruncher

Public Methods

Method Description
AddFileMonitor ( string file, string contents ) : void

Adds a cached file monitor to the list.

CrunchAsync ( string resource ) : Task

Crunches the specified resource.

Minify ( string resource ) : string

Minifies the specified resource.

Protected Methods

Method Description
CruncherBase ( CruncherOptions options ) : System

Initializes a new instance of the CruncherBase class.

LoadLocalFileAsync ( string file ) : Task

Loads the local file.

PreProcessInput ( string input, string path ) : string

Transforms the content of the given string using the correct PreProcessor.

Private Methods

Method Description
IsRemoteFile ( string resource ) : bool

Determines whether the current resource is a remote file.

IsValidFile ( string resource ) : bool

Determines whether the current resource is a valid file.

IsValidPath ( string resource ) : bool

Determines whether the current resource is a valid path.

LoadLocalFolderAsync ( string folder ) : Task

Loads the local folder.

LoadRemoteFileAsync ( string url ) : Task

Loads the remote file.

Method Details

AddFileMonitor() public method

Adds a cached file monitor to the list.
public AddFileMonitor ( string file, string contents ) : void
file string /// The file to add to the monitors list. ///
contents string /// The contents of the file. ///
return void

CrunchAsync() public method

Crunches the specified resource.
public CrunchAsync ( string resource ) : Task
resource string The file or folder containing the resource(s) to crunch.
return Task

CruncherBase() protected method

Initializes a new instance of the CruncherBase class.
protected CruncherBase ( CruncherOptions options ) : System
options CruncherOptions The options containing instructions for the cruncher.
return System

LoadLocalFileAsync() protected method

Loads the local file.
protected LoadLocalFileAsync ( string file ) : Task
file string The file to load.
return Task

Minify() public abstract method

Minifies the specified resource.
public abstract Minify ( string resource ) : string
resource string The resource.
return string

PreProcessInput() protected method

Transforms the content of the given string using the correct PreProcessor.
protected PreProcessInput ( string input, string path ) : string
input string The input string to transform.
path string The path to the file.
return string