stereobooster/react-snap

Add exclude option

Open

#362 建立於 2019年4月10日

在 GitHub 查看
 (10 留言) (33 反應) (0 負責人)JavaScript (4,982 star) (403 fork)batch import
enhancementhelp wanted

描述

Feature Request

Is your feature request related to a problem? Please describe. Need a way to ignore some paths, especially when used together with crawl: true (default) option.

Describe the solution you'd like exclude option to ignore some paths. Exclude suppose to be an array of glob patterns.

For example:

  • pattern /a/b/c would ignore /a/b/c and /a/b/c/, but not /a/b/c/d.
  • pattern /a/b/c/* would ignore /a/b/c and /a/b/c/ and /a/b/c/d.

To avoid confusion there should be additional check for include option to check that people don't use glob patterns for include, and if they do there suppose to be a message explaining why it is not possible to use glob patterns for include.

To avoid confusion there should be additional check for include and exclude, so they don't have intersection, otherwise people can be confused, why some pages are not crawled, even so they present in include.

Describe alternatives you've considered list all required pages by and and disable crawl, which is not convenient

Teachability, Documentation, Adoption, Migration Strategy Option is backward compatible.

My concerns were that this option will be tricky for end users, but 2 additional checks (described above) should prevent confusion.

Related:

貢獻者指南