Skip to content

Can't specify multiple files with wildcard or folder #335

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

Closed
khrome83 opened this issue Jan 19, 2016 · 5 comments
Closed

Can't specify multiple files with wildcard or folder #335

khrome83 opened this issue Jan 19, 2016 · 5 comments

Comments

@khrome83
Copy link

When passing in document to get documentation from, I can't specify a folder, or a wildcard.

Works - documentation ./lib/index.js ./lib/actions/text.js ./lib/actions/use.js ./lib/actions/test.js
Does Not Work - documentation ./lib/index.js ./lib/actions
Does Not Work - documentation ./lib/index.js ./lib/actions/*.js
Does Not Work - documentation ./lib/index.js ./lib/**/*

While the code will look at dependency chains and get the path to these extra files under normal circumstances, the actions directory in this case is included dynamically based on the configuration of the main library. So just running documentation ./lib/index.js does not grab the other files.

@tmcw
Copy link
Member

tmcw commented Feb 15, 2016

Are you running these commands from bash, zsh, or another shell? From my mostly-stock zsh shell, documentation build ./lib/actions/*.js works, because the shell itself interprets the glob.

@khrome83
Copy link
Author

Windows Power Shell, using cmder that wraps it and makes it nice.

I would not rely on the shell to handle globs, and would instead do this through node itself. Gulp for example resolves wildcards and works across all shells, for maximum capabilities.

Have you considered running Unit Tests against AppVeyor?

The build server is free for open source projects, like Travic CI, but uses windows. It does not use containers (like Travis CI), so it is a lot slower, but it can give you insight into issues on Windows if you don’t have a windows environment.

From: Tom MacWright [mailto:[email protected]]
Sent: Sunday, February 14, 2016 6:39 PM
To: documentationjs/documentation [email protected]
Cc: Zane Milakovic [email protected]
Subject: Re: [documentation] Can't specify multiple files with wildcard or folder (#335)

Are you running these commands from bash, zsh, or another shell? From my mostly-stock zsh shell, documentation build ./lib/actions/*.js works, because the shell itself interprets the glob.


Reply to this email directly or view it on GitHub #335 (comment) . https://github.com/notifications/beacon/ABwmAzk9nByBdDf2QZkxh9Wgj5fP9J5qks5pkRW7gaJpZM4HHWss.gif

@tmcw
Copy link
Member

tmcw commented Feb 15, 2016

See #338 - I'm trying to set up AppVeyor tests with mixed luck so far. I'd really prefer not to internalize globs, but would do that if it was the only option: it seems like it's the shell's responsibility to interpret globs, and trying to do it on the library-side introduces a lot of potential issues like incompatibility with extended glob patterns in some shells.

@tmcw
Copy link
Member

tmcw commented Mar 25, 2016

Closing: happy to accept a PR in this direction, but the difficulty of AppVeyor-only testing and our limited Windows testing resources mean that maintaining compatibility in an area like this isn't currently tenable. If anyone wants to own Windows compatibility, we'd be happy to add them to the project.

@tmcw
Copy link
Member

tmcw commented Dec 26, 2016

Good news! eslint ran into this issue, apparently, and solved it pretty well. I ported the solution in #629 and it'll be available in the next release: documentation.js itself will interpret glob patterns on Windows, making it cross-platform compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants