Skip to content

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

Closed

Description

@khrome83

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.

Activity

  1. tmcw commented on Feb 15, 2016

    @tmcw
    Member

    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.

  2. khrome83 commented on Feb 15, 2016

    @khrome83
    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:notifications@github.com]
    Sent: Sunday, February 14, 2016 6:39 PM
    To: documentationjs/documentation documentation@noreply.github.com
    Cc: Zane Milakovic zane.milakovic@icloud.com
    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

  3. tmcw commented on Feb 15, 2016

    @tmcw
    Member

    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.

  4. tmcw commented on Mar 25, 2016

    @tmcw
    Member

    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.

  5. tmcw commented on Dec 26, 2016

    @tmcw
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions