nodejs / api-docs-tooling

Node.js's tooling for API generation
https://nodejs.org/api
MIT License
5 stars 5 forks source link

fix: cli multiple input #67

Closed canerakdas closed 3 months ago

canerakdas commented 3 months ago

Description

With this PR, if the input pattern points to more than one file, we expect it to work for all of them. In the current version, it only produces output for the first file.

Validation

For example, expect the command below to produce output for all markdown files in the api directory;

npx api-docs-tooling -i PATH_TO_NODE/doc/api/*.md -t json-simple -o .
ovflowd commented 3 months ago

Sorry, what exactly was not working? For me Im able to have this working with same arguments but -i "/path/to/*.md"

canerakdas commented 3 months ago

Sorry, what exactly was not working? For me Im able to have this working with same arguments but -i "/path/to/*.md"

When I check for the main branch, -i "/path/to/*.md" gives me a JSON output of 268 lines containing only addons 🤔

ovflowd commented 3 months ago

For me it work fine when I surround with quotes, but if this PR fixes it let's get it merged :)

canerakdas commented 3 months ago

For me it work fine when I surround with quotes, but if this PR fixes it let's get it merged :)

Since it is a string array containing more than one file, at worst we fixing the input type 😄 Now I get it, it worked for me too when I added double quotes 👀