From on September 26, 2015 14:28
Currently, depCheck looks for all files under directory to get dependency result.
Some strategies can be used to optimize the performance: 1. First, it get packages from a part of files, compare with declaring packages. 2. If all declaring packages are used, stop reading files. Return everything is good. :white_check_mark: 3. If not all declaring packages are used, continue the step 1. 4. If all files are searched, but there are some declaring packaged not fulfilled, show them as unused. :x:
Concretely, it need to convert the promise
queue in checkDirectory
to Array<Func<Promise>>
queue. The promises are triggered only then function is invoked.
Copied from original issue: lijunle/depcheck-es6#49
该提问来源于开源项目:depcheck/depcheck