Build the portion of docsList that represents the individual source files within the basic-component-mixins directory.
972740
function buildMixinsDocsList() {
  return fs.readdirSync('packages/basic-component-mixins/src').filter(file => {
    return file.indexOf('.js') == file.length - 3;
  }).map(file => {
    const fileRoot = file.replace('.js', '');
    return {
      src: `packages/basic-component-mixins/src/${file}`,
      dest: `packages/basic-component-mixins/docs/${fileRoot}.md` };
  });
}
448529
def compile_slides(source):
  ''''''
  # if it's a directory, do all md files.
  if os.path.isdir(source):
    for f in os.listdir(source):
      if f.lower().endswith('.md'):
        compile_markdown_file(os.path.join(source, f))
  else:
    compile_markdown_file(source)
424640
def buildFileList(input, output=None, ivmlist=None,
                wcskey=None, updatewcs=True, **workinplace):
    
    newfilelist, ivmlist, output, oldasndict, filelist = \
        buildFileListOrig(input=input, output=output, ivmlist=ivmlist,
                    wcskey=wcskey, updatewcs=updatewcs, **workinplace)
    return newfilelist, ivmlist, output, oldasndict
905855
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;
    }
180040
def _build_module_list(source_module, index_filename, ignore_modules):
    ''''''
    out = []
    dirs_with_init = set()
    module_prefix = '' if source_module == '.' else source_module

    for root, _, filenames in walk('.'):
        root = root[2:]
        module_root = root.replace('/', '.')
        file_names = [filename[:-3] for filename in filenames if filename.endswith('.py')]

        for filename in file_names:
            if filename == '__init__':
                dirs_with_init.add(root)
                module_name = '.'.join([module_prefix, module_root]) if module_root else source_module
            elif not root:
                module_name = '.'.join([module_prefix, filename])
            else:
                module_name = '.'.join([module_prefix, root.replace('/', '.'), filename])

            if module_name.startswith('.'):
                module_name = module_name[1:]

            if module_name in ignore_modules:
                print 'Ignored file: {}{}.py'.format('{}/'.format(root), filename)
                continue

            if root and root not in dirs_with_init:
                print 'No __init__.py, skipping: {}{}.py'.format('{}/'.format(root), filename)
                continue

            source_name = '{}.py'.format(filename)
            if root:
                source_name = '{}/{}'.format(root, source_name)

            if filename == '__init__':
                output_name = '{}.md'.format(index_filename)
            else:
                output_name = '{}.md'.format(filename)
            if root:
                output_name = '{}/{}'.format(root, output_name)

            out.append({
                'directory': root,
                'file': filename,
                'module': module_name,
                'output': output_name,
                'source': source_name
            })

    return out
1240665
function buildDependencyTreeFromSources(filenames, sourcesObject) {
  const orgnizedFlat = {};

  // build tree object
  filenames.forEach(sourceFileName => {
    orgnizedFlat[sourceFileName] = {
      path: sourceFileName,
      source: sourcesObject[sourceFileName],
      dependencies: buildDependencyTreeFromSources(allImportPaths(sourcesObject[sourceFileName]), sourcesObject),
    };
  });

  // return organized object
  return orgnizedFlat;
}
853259
def build_section
      selected_file_refs = selected_strings_file_refs

      # Apply ignore list
      file_paths = filter_exclusions(selected_file_refs.map(&:path))
      filtered_file_refs = selected_file_refs.select { |file_ref| file_paths.include? file_ref.path }
      rel_file_paths = filtered_file_refs.map { |p| p.real_path.relative_path_from(Pathname.pwd) }

      log 'Non-ignored .strings files: %s', rel_file_paths.map(&:to_s)

      keys_by_file = {}
      for path in rel_file_paths
        keys_by_file[path] = keys_by_file(path)
      end
      items = keys_by_file.values.reduce({}, :merge)

      new_section('Strings', items)
    end
974843
def generate_docs(app):
    
    # Figure out the correct directories to use
    config = app.config
    config_dir = app.env.srcdir
    javascript_root = os.path.join(config_dir, config.jsdoc_source_root)
    if javascript_root[-1] != os.path.sep:
        javascript_root += os.path.sep
    if not javascript_root:
        return
    output_root = os.path.join(config_dir, config.jsdoc_output_root)
    execution_dir = os.path.join(config_dir, '..')
    exclude = config.jsdoc_exclude

    # Remove any files generated by earlier builds
    cleanup(output_root)

    # Generate the actual reST files
    jsdoc_toolkit_dir = os.path.join(SOURCE_PATH, 'jsdoc-toolkit')
    jsdoc_rst_dir = os.path.join(SOURCE_PATH, 'jsdoc-toolkit-rst-template')
    build_xml_path = os.path.join(jsdoc_rst_dir, 'build.xml')
    command = ['ant', '-f', build_xml_path,
               '-Djsdoc-toolkit.dir=%s' % jsdoc_toolkit_dir,
               '-Djs.src.dir=%s' % javascript_root,
               '-Djs.rst.dir=%s' % output_root]
    if exclude:
        exclude_args = ['--exclude=\\"%s\\"' % path for path in exclude]
        command.append('-Djs.exclude="%s"' % ' '.join(exclude_args))
    try:
        process = Popen(command, cwd=execution_dir)
        process.wait()
    except OSError:
        raise JSDocError('Error running ant; is it installed?')

    # Convert the absolute paths in the file listing to relative ones
    path = os.path.join(output_root, 'files.rst')
    with open(path, 'r') as f:
        content = f.read()
    content = content.replace(javascript_root, '')
    with open(path, 'w') as f:
        f.write(content)
1017788
function bowerMainFiles(destination, allDone) {
			async.parallel({
				map: bowerList('map'),
				components: bowerList('paths')
			}, function(err, lists) {
				// Ensure all manual defined dependencies are contained in an array
				if (dependencies) {
					_.map(dependencies, function(value, key) {
						dependencies[key] = ensureArray(value);
					});
				}

				// Exclude devDependencies
				var devDependencies = lists.map.pkgMeta.devDependencies;
				if (devDependencies && !includeDev) {
					excludes = excludes.concat(Object.keys(devDependencies));
				}

				// Resolve dependency graph to ensure correct order of components when concat them
				var resolvedDependencies = resolveDependencies(lists.map);

				// List of main files
				var files = {};
				var groupStats = {};

				_.each(lists.components, function(component, name) {
					if (includes.length && _.indexOf(includes, name) === -1) return;
					if (excludes.length && _.indexOf(excludes, name) !== -1) return;

					var mainFiles = findMainFiles(name, component, lists.map.dependencies[name]);
					if (mainFiles.length) {
						if (callback) mainFiles = callback(mainFiles, name);

						var filteredMainFiles = mainFiles.filter(function(file) {
							return isFileExtension(file, '.' + destination.assetType);
						});
						if (grunt.option('verbose')) {
							groupStats[name]  = filteredMainFiles.map(_.partial(toFileStats, name));
						}

						files[name] = filteredMainFiles.map(grunt.file.read);
					}
					else {
						// Try to find and concat minispade package: packages/_name_/lib/main.js
						var pkg = getNpmPackage(name, component);
						if (pkg) {
							files[name] = pkg;
						}
						else {
							grunt.log.error('Can’t detect any .' + destination.path + ' on main files for "' +
								name + '" component. ' +
								'You should explicitly define it via bower_concat’s mainFiles option. ' +
								'See Readme for details.'
								);
						}
					}
				});

				if (grunt.option('verbose')) {
					logGroupStats(destination.assetType, resolvedDependencies, destination.path, groupStats);
					grunt.verbose.writeln();
				}

				// Gather files by respecting the order of resolved dependencies
				var modules = [];
				_.each(resolvedDependencies, function(name) {
					if (files[name]) {
						modules = modules.concat(files[name]);
					}
				});

				allDone(modules);
			});
		}
308133
protected void buildIndexMap(RootDoc root)  {
        PackageDoc[] packages = root.specifiedPackages();
        ClassDoc[] classes = root.classes();
        if (!classesOnly) {
            if (packages.length == 0) {
                Set<PackageDoc> set = new HashSet<PackageDoc>();
                PackageDoc pd;
                for (int i = 0; i < classes.length; i++) {
                    pd = classes[i].containingPackage();
                    if (pd != null && pd.name().length() > 0) {
                        set.add(pd);
                    }
                }
                adjustIndexMap(set.toArray(packages));
            } else {
                adjustIndexMap(packages);
            }
        }
        adjustIndexMap(classes);
        if (!classesOnly) {
            for (int i = 0; i < classes.length; i++) {
                if (shouldAddToIndexMap(classes[i])) {
                    putMembersInIndexMap(classes[i]);
                }
            }
        }
        sortIndexMap();
    }
1007624
function getComponents(file) {
    var relativePath = file.relative;
    var pathParts = Path.dirname(relativePath).split(Path.sep);
    return {
        ext: Path.extname(relativePath).substr(1), // strip dot
        filename: Path.basename(relativePath),
        packageName: pathParts[0]
    };
}
1352775
def DocFileSuite(*paths, **kwargs):
    """"""
    kwargs.setdefault('setUp', setUpBrowser)
    kwargs.setdefault('tearDown', tearDownBrowser)
    kwargs.setdefault('globs', {}).update(Browser=Browser)
    kwargs.setdefault('optionflags', doctest.NORMALIZE_WHITESPACE |
                                     doctest.REPORT_ONLY_FIRST_FAILURE |
                                     doctest.ELLIPSIS)
    if 'package' not in kwargs:
        # Resolve relative names based on the caller's module
        kwargs['package'] = doctest._normalize_module(None)
        kwargs['module_relative'] = True
    return doctest.DocFileSuite(*paths, **kwargs)
507602
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;
}
886481
function getIncludeFiles(glob) {

    var folders = settings.folders;

    var options = {
      read: false,
      cwd: path.resolve(folders.dest + '/' + folders.vendor)
    };

    return gulp.src(glob, options);

  }
512318
def build_includes():
    
    print("Running scripts in _include:")
    cwd = os.getcwd()
    os.chdir('_include')
    pyfiles = glob.glob('*.py')
    for fn in pyfiles:
        if not fn.startswith('_'):
            print(' {}'.format(fn))
            subprocess.check_output(['python', fn])
    os.chdir(cwd)
165740
function buildDocs() {
  return Promise.resolve()
    .then(() => new Promise((resolve, reject) => {
      Metalsmith(__dirname)
        .source('./source/docs')
        .destination('./docs')
        .clean(true)
        .use(Markdown())
        .metadata({
          version: __version
        })
        .use(Layouts({
          engine: 'handlebars',
          directory: './source/layouts',
          rename: false
        }))
        // Update {{version}} in content since it's not processed with Handlebars
        .use((files, metalsmith, done) => {
          Object.keys(files).forEach((key) => {
            let file = files[key];

            file.contents = new Buffer(
              file.contents
                .toString()
                .replace(/\{\{version\}\}/g, __version)
            );
          });

          done();
        })
        .build((err) => {
          if(err) {
            reject(err);
            return;
          }
          console.log(Chalk.green('Docs generated! 📚'));

          resolve();
        });
    }));
}
1029565
def build_class_list(level, from, section, infile=nil)
      res = ""
      prefix = "&nbsp;&nbsp;::" * level;

      from.modules.sort.each do |mod|
        next unless mod.section == section
        next if infile && !mod.defined_in?(infile)
        if mod.document_self
          res << 
            prefix <<
            "Module " <<
            href(url(mod.viewer.path), "link", mod.full_name) <<
            "<br />\n" <<
            build_class_list(level + 1, mod, section, infile)
        end
      end

      from.classes.sort.each do |cls|
        next unless cls.section == section
        next if infile && !cls.defined_in?(infile)
        if cls.document_self
          res      <<
            prefix << 
            "Class " <<
            href(url(cls.viewer.path), "link", cls.full_name) <<
            "<br />\n" <<
            build_class_list(level + 1, cls, section, infile)
        end
      end

      res
    end