function findAllDependencies(file, knownDependencies, baseDir, knownFiles) {
  if (!knownDependencies) {
    knownDependencies = [];
  }

  if (typeof knownFiles === "undefined"){
    knownFiles = [];
  } else if (knownFiles.indexOf(file) > -1){
    return knownDependencies;
  }

  if (baseDir) {
    return findAllDependenciesHelp(file, knownDependencies, baseDir, knownFiles).then(function(thing){
      return thing.knownDependencies;
    });
  } else {
    return getBaseDir(file).then(function(newBaseDir) {
      return findAllDependenciesHelp(file, knownDependencies, newBaseDir, knownFiles).then(function(thing){
        return thing.knownDependencies;
      });
    })
  }
}
// Elm file depends on, based on the modules it loads via `import`.
Elm file depends on, based on the modules it loads via `import`.
Elm file depends on based on the modules it loads via ` import ` .
function findAllDependencies(file, knownDependencies, baseDir, knownFiles) {
  if (!knownDependencies) {
    knownDependencies = [];
  }
  if (typeof knownFiles === "undefined"){
    knownFiles = [];
  } else if (knownFiles.indexOf(file) > -1){
    return knownDependencies;
  }
  if (baseDir) {
    return findAllDependenciesHelp(file, knownDependencies, baseDir, knownFiles).then(function(thing){
      return thing.knownDependencies;
    });
  } else {
    return getBaseDir(file).then(function(newBaseDir) {
      return findAllDependenciesHelp(file, knownDependencies, newBaseDir, knownFiles).then(function(thing){
        return thing.knownDependencies;
      });
    })
  }
}
function findAllDependencies ( file , knownDependencies , baseDir , knownFiles ) { if ( ! knownDependencies ) { knownDependencies = [ ] ; } if ( typeof knownFiles === "undefined" ) { knownFiles = [ ] ; } else if ( knownFiles . indexOf ( file ) > - 1 ) { return knownDependencies ; } if ( baseDir ) { return findAllDependenciesHelp ( file , knownDependencies , baseDir , knownFiles ) . then ( function ( thing ) { return thing . knownDependencies ; } ) ; } else { return getBaseDir ( file ) . then ( function ( newBaseDir ) { return findAllDependenciesHelp ( file , knownDependencies , newBaseDir , knownFiles ) . then ( function ( thing ) { return thing . knownDependencies ; } ) ; } ) } }
Elm file depends on, based on the modules it loads via `import`.
Elm file depends on based on the modules it loads via ` import ` .