function findModule(name) {
    if (foundModules[name]) { return; }
    foundModules[name] = true;

    function breakup(text, separator) {
      return text.replace(/[A-Z]/g, function (match) {
        return separator + match;
      });
    }
    function ucwords(text) {
      return text.replace(/^([a-z])|\s+([a-z])/g, function ($1) {
        return $1.toUpperCase();
      });
    }
    function enquote(str) {
      return `"${str}"`;
    }
    function enquoteUibDir(str) {
      return enquote(`uib/${str}`);
    }

    var module = {
      name: name,
      moduleName: enquote(`ui.bootstrap.${name}`),
      displayName: ucwords(breakup(name, ' ')),
      srcFiles: grunt.file.expand([`src/${name}/*.js`, `!src/${name}/index.js`, `!src/${name}/index-nocss.js`]),
      cssFiles: grunt.file.expand(`src/${name}/*.css`),
      tplFiles: grunt.file.expand(`template/${name}/*.html`),
      tpljsFiles: grunt.file.expand(`template/${name}/*.html.js`),
      tplModules: grunt.file.expand(`template/${name}/*.html`).map(enquoteUibDir),
      dependencies: dependenciesForModule(name),
      docs: {
        md: grunt.file.expand(`src/${name}/docs/*.md`)
          .map(grunt.file.read).map((str) => marked(str)).join('\n'),
        js: grunt.file.expand(`src/${name}/docs/*.js`)
          .map(grunt.file.read).join('\n'),
        html: grunt.file.expand(`src/${name}/docs/*.html`)
          .map(grunt.file.read).join('\n')
      }
    };

    var styles = {
      css: [],
      js: []
    };
    module.cssFiles.forEach(processCSS.bind(null, module.name, styles, true));
    if (styles.css.length) {
      module.css = styles.css.join('\n');
      module.cssJs = styles.js.join('\n');
    }

    module.dependencies.forEach(findModule);
    grunt.config('modules', grunt.config('modules').concat(module));
  }
/*.html'],
          ext: '.html.js'
        }]
      }
    },
    eslint: {
      files: ['Gruntfile.js','src/*