C# Class Plovr.Builders.DependencyBuilder

Show file Open project: hikirsch/Plovr.NET Class Usage Examples

Private Properties

Property Type Description
BuildDepedencyTree void
BuildDepedencyTree void
GetDetailsFromJsFilePath void
GetFileContentsWithoutJavaScriptComments string
GetGoogBasePath string
RecurseDependencies void

Public Methods

Method Description
DependencyBuilder ( IPlovrProject projectElement, IPlovrSettings settings ) : System

Our constructor, allows you to pass in a single base path that is comma delimited.

GetDependencies ( ) : IEnumerable

Once a dependency tree is built, we can pass a namespace here and figure out what files are necessary to compile that namespace. This function is a variant and takes a list of strings where each item is a single namespace.

Private Methods

Method Description
BuildDepedencyTree ( ) : void

Start building the depedency tree.

BuildDepedencyTree ( string currentPath, string filePattern, string>.Action getDetailsFromJsFilePath, string regex ) : void

Scan the directory passed and build the dependency tree.

GetDetailsFromJsFilePath ( string filePath, string regex ) : void

Parse the dependency tree info from the passed in file.

GetFileContentsWithoutJavaScriptComments ( string filePath ) : string

Read the file contents from the path passed, and remove the javascript comments from the file.

GetGoogBasePath ( ) : string
RecurseDependencies ( string jsNamespace, List &dependencyList ) : void

Build out the dependencies needed to load the passed in namespace. This is a recursive function that detects what namespaces the passed in namespace requires and calls itself to resolve the depedencies. A dependency array is passed by reference to support the ability of recursing.

Method Details

DependencyBuilder() public method

Our constructor, allows you to pass in a single base path that is comma delimited.
public DependencyBuilder ( IPlovrProject projectElement, IPlovrSettings settings ) : System
projectElement IPlovrProject the project we want to compile
settings IPlovrSettings the settings we use to compile
return System

GetDependencies() public method

Once a dependency tree is built, we can pass a namespace here and figure out what files are necessary to compile that namespace. This function is a variant and takes a list of strings where each item is a single namespace.
public GetDependencies ( ) : IEnumerable
return IEnumerable