This enhance the procedure to find path of jsdoc binary by checking if the file exists.
It also use 2 possible paths to perform this check, one for npm and the other for yarn.
Close#6633
Because we don't know if a new or modified file includes changes to the class hierarchy, we regenerate info for all sources any time any one has changed. An alternative would be to generate info first for the new or modified file and then (potentially) regenerate info for more source files in the class hierarchy, but this makes the generate-info.js task far more complicated.
This is to accomodate the case where other directories than "ol" include "api" annotations. For example, the Swisstopo geoadmin folks extend OpenLayers 3 in an ol3 fork, and they have their own "ga" namespace/directory under "src". See https://github.com/geoadmin/ol3/tree/master/src.
This task generates build related metadata for the library based on doc annotations. Since it is about more than writing out exportable symbols, it makes sense to have a more general name.