Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close #93: recursive scan lib directory #193

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

@@ -29,11 +29,15 @@ let is_flow_file path =
List.exists (Filename.check_suffix path) flow_extensions &&
not (is_directory path)

let read_dir dir =
let rec read_dir dir =
Sys.readdir dir
|> Array.to_list
|> List.filter (fun file -> Filename.check_suffix file ".js")
|> List.map (fun file -> Filename.concat dir file)
|> Array.to_list
|> List.map (fun file -> Filename.concat dir file)
|> List.map (fun file_or_dir -> match Sys.is_directory file_or_dir with
| true -> read_dir file_or_dir
| _ -> [file_or_dir])
|> List.concat
|> List.filter (fun file -> Filename.check_suffix file ".js")

let lib_files = ref []

ProTip! Use n and p to navigate between commits in a pull request.