bit-docs / bit-docs-glob-finder

Bit-docs default finder that uses glob patterns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to specify array for multiple glob patterns

leoj3n opened this issue · comments

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.