Skip to content

Ability to specify array for multiple glob patterns #3

@leoj3n

Description

@leoj3n

It would help with developing the bit-docs-website if I could control what is included for processing into the generated docMap by specifying multiple glob patterns like:

    "glob": {
      "pattern": [
        "docs/bit-docs*/**/*.{js,md}",
        "node_modules/bit-docs/**/*.{js,md}",
        "node_modules/bit-docs-generate-html/**/*.{js,md}"
      ],
      "ignore": [
          "node_modules/bit-docs/lib/configure/**/*",
          "node_modules/bit-docs*/node_modules/**/*"
        ]
    },

Currently, to achieve this, I have to do something like:

    "glob": {
      "pattern": [
        "{node_modules,docs}/{bit-docs,bit-docs-generate-html,bit-docs-another,bit-docs-etc}/**/*.{js,md}"
      ],
      "ignore": [
          "node_modules/bit-docs/lib/configure/**/*",
          "node_modules/bit-docs*/node_modules/**/*"
        ]
    },

Which is hard to read and will become hard to edit. A better option would be to clone these dependency repos one at a time into the docs/bit-docs directory and update the ignore.

I could do that, but I still could benefit from the flexibility of being able to specify multiple glob patterns just like it is possible to specify multiple ignore patterns. Future developers will probably expect or request pattern to work the same as ignore.

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