nl_tokens: ------------------------------------------------------------------------ Validate and add in templates directory source . ------------------------------------------------------------------------
pl_tokens: function ( cb ) { var templatesDir = self . data . _templatesDir ; var templatesPath = path . join ( <mask> . src , "extracted" , templatesDir ) ; fs . stat ( templatesPath , function ( err , stats ) { if ( err ) { if ( err . code === "ENOENT" ) { return void cb ( new Error ( "Templates path '" + templatesPath + "' directory not found" ) ) ; } return void cb ( err ) ; } if ( ! stats . isDirectory ( ) ) { return void cb ( new Error ( "Templates path '" + templatesPath + "' exists, but is not a directory" ) ) ; } cb ( null , templatesPath ) ; } ) ; }