nl_tokens: Parse a sitemap generate input and optionally update the local file for sitemapPolicy purposes . This writes the sitemap files out EVEN IF sitemapPolicy is false . The thinking is that it s better / cheaper to do this b / c if sitemapPolicy is enabled later then there is something to compare against for more savings .
pl_tokens: function processSitemap ( options , document , callback ) { smLib . parse ( options , document , function ( err ) { var sitemapIndexOpts = <mask> . __sitemapIndex ; var outputPath = base . outputFile ( sitemapIndexOpts , options . source ) ; if ( ! err && sitemapIndexOpts . sitemapOutputDir ) { prepareWrite ( outputPath , function ( err ) { if ( ! err ) { fs . writeFile ( outputPath , document , callback ) ; } else { callback ( common . prependMsgToErr ( err , outputPath , true ) ) ; } } ) ; } else { callback ( err ) ; } } ) ; }