docs: function findMainFiles(name, component, meta) {
  			grunt.verbose.writeln();
  			grunt.verbose.writeln('Finding main file for ' + name + '...');
  			var mainFiles = ensureArray(component);
  
  			// Main file explicitly defined in bower_concat options
  			if (mains[name]) {
  				var componentDir = meta && meta.canonicalDir || path.join(bowerDir, bower.config.directory, name);
  				var manualMainFiles = ensureArray(mains[name]);
  				manualMainFiles = _.map(manualMainFiles, joinPathWith(componentDir));
  				grunt.verbose.writeln('Main file was specified in bower_concat options: ' + manualMainFiles);
  				return manualMainFiles;
  			}
  
  			// Bower knows main JS file?
  			mainFiles = _.map(mainFiles, joinPathWith(bowerDir));
  			var mainJSFiles = _.filter(mainFiles, function(file) { return isFileExtension(file, '.js'); });
  			var mainCSSFiles = _.filter(mainFiles, function(file) { return isFileExtension(file, '.css'); });
  			var mainSCSSFiles = _.filter(mainFiles, function(file) { return isFileExtension(file, '.scss'); });
  			var allMainFiles = mainJSFiles.concat(mainCSSFiles.concat(mainSCSSFiles));
  
  			if (allMainFiles.length) {
  				grunt.verbose.writeln('Main file was specified in bower.json: ' + allMainFiles);
  				return allMainFiles;
  			}
  
  			// Try to find main JS, CSS, SCSS files
  			var jsFiles = expandForAll(component, joinPathWith(bowerDir, '*.js'));
  			var cssFiles = expandForAll(component, joinPathWith(bowerDir, '*.css'));
  			var scssFiles = expandForAll(component, joinPathWith(bowerDir, '*.scss'));
  
  			// Skip Gruntfiles
  			jsFiles = _.filter(jsFiles, function(filepath) {
  				return !/(Gruntfile\.js)|(grunt\.js)$/.test(filepath);
  			});
  
  			var mainJsFiles = [];
  			if (jsFiles.length === 1) {
  				// Only one JS file: no doubt it’s main file
  				grunt.verbose.writeln('Considering the only JS file in a component’s folder ' +
  					 'as a main file: ' + jsFiles
  						);
  				mainJsFiles = jsFiles;
  			}
  			else {
  				// More than one JS file: try to guess
  				var bestFile = guessBestFile(name, jsFiles);
  				if (bestFile) {
  					grunt.verbose.writeln('Guessing the best JS file in a component’s folder: ' + [bestFile]);
  					mainJsFiles = [bestFile];
  				}
  				else {
  					grunt.verbose.writeln('Main JS file not found');
  				}
  			}
  			return mainJsFiles.concat(cssFiles);
  		}