lib/dishwasher.js
function readPartials(userDir, cwd) {
  if (cwd) {
    userDir = path.join(cwd, userDir);
  }
  // Use working directory of process if not specified
  else {
    userDir = path.join(path.dirname(process.argv[1]), userDir);
  }
  partials = {};
  var filenames = fs.readdirSync(userDir);
  for (var i = 0; i < filenames.length; i++) {
    partials[filenames[i].slice(0, -5)] = fs.readFileSync(
      path.join(userDir, filenames[i]), 'utf8'
    );
  }
  return partials;
}
function readPartials(userDir, cwd) {
  if (cwd) {
    userDir = path.join(cwd, userDir);
  }
  // Use working directory of process if not specified
  else {
    userDir = path.join(path.dirname(process.argv[1]), userDir);
  }
  partials = {};
  var filenames = fs.readdirSync(userDir);
  for (var i = 0; i < filenames.length; i++) {
    partials[filenames[i].slice(0, -5)] = fs.readFileSync(
      path.join(userDir, filenames[i]), 'utf8'
    );
  }
  return partials;
}
function readPartials ( userDir , cwd ) { if ( cwd ) { userDir = path . join ( cwd , userDir ) ; } // Use working directory of process if not specified else { userDir = path . join ( path . dirname ( process . argv [ 1 ] ) , userDir ) ; } partials = { } ; var filenames = fs . readdirSync ( userDir ) ; for ( var i = 0 ; i < filenames . length ; i ++ ) { partials [ filenames [ i ] . slice ( 0 , - 5 ) ] = fs . readFileSync ( path . join ( userDir , filenames [ i ] ) , 'utf8' ) ; } return partials ; }
Read all partials from disk
Read all partials from disk