@@ -20,7 +20,7 @@ var Loader = function (data) {
2020 options [ key ] = _ . has ( options , key ) ? options [ key ] : defaults [ key ] ;
2121 } ) ;
2222
23- staticFullPaths = _ . map ( options . staticDirectories , function ( dir ) {
23+ staticFullPaths = _ . map ( options . directories , function ( dir ) {
2424 return path . resolve ( options . path , dir . directory )
2525 } ) ;
2626 logger = new Logger ( options . log ) ;
@@ -91,7 +91,7 @@ var Loader = function (data) {
9191 * @returns {string }
9292 */
9393 function getDirectoryByExtension ( ext ) {
94- var dirObj = _ . chain ( options . staticDirectories )
94+ var dirObj = _ . chain ( options . directories )
9595 . filter ( function ( dir ) {
9696 return _ . indexOf ( dir . extensions , ext ) >= 0
9797 } )
@@ -297,18 +297,16 @@ var Loader = function (data) {
297297 // Load all sources
298298 _ . each ( options . srcToLoad , function ( src ) {
299299 p = p . then ( function ( newHtml ) {
300- return loadSources ( newHtml , src . selector , src . attributeName )
300+ return loadSources ( newHtml , src . selector , src . attr )
301301 } ) ;
302302 } ) ;
303303
304304 // Save index page
305305 var indexFilePath = path . resolve ( options . path , options . indexFile ) ;
306306 p = p . then ( function ( html ) {
307- return fs . outputFileAsync ( indexFilePath , html , { encoding : encoding } )
308- } )
309- . then ( function ( ) {
310- return { status : 'success' }
311- } ) ;
307+ fs . outputFileSync ( indexFilePath , html , { encoding : encoding } ) ;
308+ return { html : html }
309+ } ) ;
312310
313311 return p ;
314312 }
0 commit comments