Skip to content

Commit

Permalink
docs(config): update module documentation (#1547)
Browse files Browse the repository at this point in the history
Clarify Rule documentation in `module.md` and fix some broken 
links. Add explanation of mutually exclusive `Rule` options (either 
supply a `resource` or supply `test`|`exclude`|`include`).
  • Loading branch information
dylanonelson authored and skipjack committed Aug 29, 2017
1 parent 85298c7 commit 597b211
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/content/configuration/module.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ contributors:
- skipjack
- jouni-kantola
- jhnns
- dylanonelson
---

These options determine how the [different types of modules](/concepts/modules) within a project will be treated.
Expand Down Expand Up @@ -104,12 +105,12 @@ Inline loaders and `!` prefixes should not be used as they are non-standard. The

## `Rule.exclude`

`Rule.exclude` is a shortcut to `Rule.resource.exclude`. See [`Rule.resource`](#rule-resource) and [`Condition.exclude`](#condition) for details.
`Rule.exclude` is a shortcut to `Rule.resource.exclude`. If you supply a `Rule.exclude` option, you cannot also supply a `Rule.resource`. See [`Rule.resource`](#rule-resource) and [`Condition.exclude`](#condition) for details.


## `Rule.include`

`Rule.include` is a shortcut to `Rule.resource.include`. See [`Rule.resource`](#rule-resource) and [`Condition.include`](#condition) for details.
`Rule.include` is a shortcut to `Rule.resource.include`. If you supply a `Rule.include` option, you cannot also supply a `Rule.resource`. See [`Rule.resource`](#rule-resource) and [`Condition.include`](#condition) for details.


## `Rule.issuer`
Expand Down Expand Up @@ -188,7 +189,7 @@ parser: {

## `Rule.resource`

A [`Condition`](#condition) matched with the resource. See details in [`Rule` conditions](#rule-conditions).
A [`Condition`](#condition) matched with the resource. You can either supply a `Rule.resource` option or use the shortcut options `Rule.test`, `Rule.exclude`, and `Rule.include`. See details in [`Rule` conditions](#rule-conditions).


## `Rule.resourceQuery`
Expand All @@ -210,7 +211,7 @@ An array of [`Rules`](#rule) that is also used when the Rule matches.

## `Rule.test`

`Rule.test` is a shortcut to `Rule.resource.test`. See [`Rule.resource`](#rule-resource) and [`Condition.test`](#condition) for details.
`Rule.test` is a shortcut to `Rule.resource.test`. If you supply a `Rule.test` option, you cannot also supply a `Rule.resource`. See [`Rule.resource`](#rule-resource) and [`Condition.test`](#condition) for details.


## `Rule.use`
Expand Down

0 comments on commit 597b211

Please sign in to comment.