nl_tokens: loadPartials [ This function is responsible for taking all the formatted data pointing to all the partials and recurseive directories and using that information to load the partial files into the template engine . ]
pl_tokens: function ( template_engine_reference , root_directory , current_directory , template_extensions , delimiter_symbol ) { files = fs . readdirSync ( current_directory ) ; for ( var i = 0 ; i < <mask> . length ; i ++ ) { var fullPath = path . join ( current_directory , files [ i ] ) ; stat = fs . statSync ( fullPath ) ; if ( stat . isFile ( ) ) { var file_extension = path . extname ( fullPath ) . slice ( 1 ) ; if ( _ . indexOf ( template_extensions , file_extension ) != - 1 ) { var template = fs . readFileSync ( fullPath , 'utf8' ) ; var partial_name_space = fsHelper . getDirDifference ( root_directory , fullPath ) ; partial_name_space = partial_name_space . replace ( / \\ / g , delimiter_symbol ) ; console . log ( 'Loading Partial into Handlebars engine.' ) ; console . log ( '\tPartial Name Space: ' + partial_name_space ) ; console . log ( '\tFull Path to NameSpace: ' + fullPath ) ; console . log ( '-----------------------------------------' ) ; template_engine_reference . registerPartial ( partial_name_space , template ) ; } } } var subdirectories = fsHelper . getDirPathsSync ( current_directory ) ; for ( var i = 0 ; i < subdirectories . length ; i ++ ) { loadPartials ( template_engine_reference , root_directory , subdirectories [ i ] , template_extensions , delimiter_symbol ) ; } }