code: function(filename, template, outputInInput) {
      var basename;
      var glob;
  
      template = Array.isArray(template) ? filename : template;
      glob = isGlob(template);
      if (outputInInput) {
        basename = _toArray(filename.split('.').pop()) ;
      } else if (glob) {
        basename = filename.slice(glob.length, filename.length).split('.');
        basename.pop();
      } else {
        basename = filename.split('/').pop().split('.');
        basename.pop();
      }
      return basename.join('.');
    }
docs: Figures out the name of the file before any globs are used, so the globbed outputs can be generated