app/templates/_Gruntfile.js
function findBowerMainFiles(componentsPath) {
        var files = [];

        fs.readdirSync(componentsPath).filter(function (file) {
            return fs.statSync(componentsPath + '/' + file).isDirectory();
        }).forEach(function (packageName) {
            var bowerJsonPath = componentsPath + '/' + packageName + '/bower.json';
            if (fs.existsSync(bowerJsonPath)) {
                var json = grunt.file.readJSON(bowerJsonPath);
                files.push(packageName + '/' + json.main);
            }
        });

        return files;
    }
function findBowerMainFiles(componentsPath) {
        var files = [];

        fs.readdirSync(componentsPath).filter(function (file) {
            return fs.statSync(componentsPath + '/' + file).isDirectory();
        }).forEach(function (packageName) {
            var bowerJsonPath = componentsPath + '/' + packageName + '/bower.json';
            if (fs.existsSync(bowerJsonPath)) {
                var json = grunt.file.readJSON(bowerJsonPath);
                files.push(packageName + '/' + json.main);
            }
        });

        return files;
    }
function findBowerMainFiles ( componentsPath ) { var files = [ ] ; fs . readdirSync ( componentsPath ) . filter ( function ( file ) { return fs . statSync ( componentsPath + '/' + file ) . isDirectory ( ) ; } ) . forEach ( function ( packageName ) { var bowerJsonPath = componentsPath + '/' + packageName + '/bower.json' ; if ( fs . existsSync ( bowerJsonPath ) ) { var json = grunt . file . readJSON ( bowerJsonPath ) ; files . push ( packageName + '/' + json . main ) ; } } ) ; return files ; }
Parses the given components path and returns a list with the main file for each bower dependency.
@param {string} componentsPath path to Bower components
@returns {Array} list of files
Parses the given components path and returns a list with the main file for each bower dependency .