jsdoc-api icon indicating copy to clipboard operation
jsdoc-api copied to clipboard

allows `options.source` also to be an array of strings

Open mbehzad opened this issue 8 years ago • 4 comments

Use case: Source code of multiple files need to be prepossessed before passing them to the jsdoc-api for the doc generation. Concatenation of these codes would not always be possible. e.g. when these files contain export default statements, which would lead to babylon errors regarding multiple default exports in a module. This pull request allows options.source to be in addition to a string, an array of strings which are stored each in a temporary file and prepossessed similar to the options.files option.

Commit comment: generates a temp source file for each code string in the options.source, adds unit test, updates / generates readme, minor fix in the documentation for options.source regarding using either source or files.

mbehzad avatar Nov 10 '17 12:11 mbehzad

when running the tests locally with the same node version (v8.9.1) as in the travis error. everything passes without any issues. (on a 64x windows machine) 🤔

mbehzad avatar Nov 10 '17 12:11 mbehzad

Hi, thanks for the patch. Travis runs the test suite on Linux, which has a case-sensitive file system. Is the issue anything to case-sensitivity in file names?

75lb avatar Nov 13 '17 10:11 75lb

i run the tests locally in a docker container (linux, node v8.9.1) and they run without errors. I couldn't find any wrong file names in the code and I don't think the file names are the issue because the error is only in one node version and also for some old tests which shouldn't be affected by the PR. hmmm, is it possible to restart the travis build?

mbehzad avatar Nov 18 '17 09:11 mbehzad

tests are passing now

mbehzad avatar Jun 27 '18 11:06 mbehzad