src/loader.js
function renderGraph(componentDirectory, sortedComponents) {
  let dot = [
    '// This graph shows all dependencies for this loader.',
    '// You might find http://www.webgraphviz.com/ useful!',
    '',
    'digraph G {',
  ];

  for (let component of sortedComponents) {
    dot.push(util.format('  "%s"', component));
    let def = componentDirectory[component] || {};
    for (let dep of def.requires || []) {
      dot.push(util.format('  "%s" -> "%s" [dir=back]', dep, component));
    }
  }
  dot.push('}');

  return dot.join('\n');
}
function renderGraph(componentDirectory, sortedComponents) {
  let dot = [
    '// This graph shows all dependencies for this loader.',
    '// You might find http://www.webgraphviz.com/ useful!',
    '',
    'digraph G {',
  ];

  for (let component of sortedComponents) {
    dot.push(util.format('  "%s"', component));
    let def = componentDirectory[component] || {};
    for (let dep of def.requires || []) {
      dot.push(util.format('  "%s" -> "%s" [dir=back]', dep, component));
    }
  }
  dot.push('}');

  return dot.join('\n');
}
function renderGraph ( componentDirectory , sortedComponents ) { let dot = [ '// This graph shows all dependencies for this loader.' , '// You might find http://www.webgraphviz.com/ useful!' , '' , 'digraph G {' , ] ; for ( let component of sortedComponents ) { dot . push ( util . format ( '  "%s"' , component ) ) ; let def = componentDirectory [ component ] || { } ; for ( let dep of def . requires || [ ] ) { dot . push ( util . format ( '  "%s" -> "%s" [dir=back]' , dep , component ) ) ; } } dot . push ( '}' ) ; return dot . join ( '\n' ) ; }
Render componentDirectory to dot format for graphviz given a
topologically sorted list of components
Render componentDirectory to dot format for graphviz given a topologically sorted list of components