code: function constructFileList (dir, mains, minified) {
    var files = fs.readdirSync(dir);
  
    files = _.map(files, function (f) {
      return path.join(dir, f);
    });
  
    _.each(files, function (f, i, l) {
      if (fs.statSync(f).isDirectory())
        files = files.concat(constructFileList(f, mains, minified));
    });
  
    files = _.filter(files, function (f) {
      if (fs.statSync(f).isDirectory()) return false;
  
      var fname = path.basename(f).split('.').slice(0, -1).join('.');
  
      var include = _.some(mains, function (m) {
        m = path.basename(m).split('.').slice(0, -1).join('.');
        return m === fname;
      });
  
      if (minified)
        include = f.indexOf('.min.js') === (f.length - 7)
               || f.indexOf('.min.css') === (f.length - 8);
  
      return include;
    });
  
    if (minified && files.length === 0) {
      return constructFileList(dir, mains, false);
    }
  
    return files;
  }
docs: constructFileList: create a list of files to concat for a particular package. 'dir' is the path to the package, 'mains' is the 'main' field in the package's bower.json, 'minified' is whether or not to include minified files