index.js
function findImports(filePath, result) {
  var importPaths = getImportPaths(filePath);
  var importPathsAbs = resolveImportPaths(filePath, importPaths);
  if( importPathsAbs.length )
    result.full[filePath] = importPathsAbs;
  importPathsAbs.forEach(function(path){
    if (result.simple.indexOf(path) === -1) {
      result.simple.push(path);
      findImports(path, result);
    }
  });
  return result;
}
function findImports(filePath, result) {
  var importPaths = getImportPaths(filePath);
  var importPathsAbs = resolveImportPaths(filePath, importPaths);
  if( importPathsAbs.length )
    result.full[filePath] = importPathsAbs;
  importPathsAbs.forEach(function(path){
    if (result.simple.indexOf(path) === -1) {
      result.simple.push(path);
      findImports(path, result);
    }
  });
  return result;
}
function findImports ( filePath , result ) { var importPaths = getImportPaths ( filePath ) ; var importPathsAbs = resolveImportPaths ( filePath , importPaths ) ; if ( importPathsAbs . length ) result . full [ filePath ] = importPathsAbs ; importPathsAbs . forEach ( function ( path ) { if ( result . simple . indexOf ( path ) === - 1 ) { result . simple . push ( path ) ; findImports ( path , result ) ; } } ) ; return result ; }
Recursivley finds all @import paths of a LESS file, using a nice RegEx
@param {string} filePath - The path of the LESS file.
@param {Object} result
@returns {Object}
Recursivley finds all