Skip to content

Commit

Permalink
docs: add descriptions about relative patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
yenshih committed Nov 11, 2019
1 parent 0a37edc commit 9f8f468
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ module.exports = {
loader: 'style-resources-loader',
options: {
patterns: [
'path/from/context/to/scss/variables/*.scss',
'path/from/context/to/scss/mixins/*.scss',
'./path/from/context/to/scss/variables/*.scss',
'./path/from/context/to/scss/mixins/*.scss',
]
}
}]
Expand Down Expand Up @@ -133,16 +133,17 @@ A string or an array of string, which represents the path to the resources you w

It supports [globbing](https://github.com/isaacs/node-glob). You could include many files using a file mask.

For example, `path.resolve(__dirname, './styles/*/*.less')` would include all `less` files from `variables` and `mixins` directories and ignore `reset.less` in such following structure.
For example, `'./styles/*/*.less'` would include all `less` files from `variables` and `mixins` directories and ignore `reset.less` in such following structure.

```
./styles
/variables
|-- fonts.less
|-- colors.less
/mixins
|-- size.less
|-- reset.less
./src <-- context
/styles
/variables
|-- fonts.less
|-- colors.less
/mixins
|-- size.less
|-- reset.less
```

Only supports `.css` `.sass` `.scss` `.less` `.styl` as resources file extensions.
Expand Down

0 comments on commit 9f8f468

Please sign in to comment.