Skip to content

Commit 3326ba1

Browse files
committed
fix some faults
1 parent 4291a23 commit 3326ba1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The rule consists of two parts:
4646

4747
1. Conditions in which cases a rule should work. To do this, you specify a regular expression for _id_ (query string), _base_ (path to module which requires resource), or _module_ (resolved path by postcss-import).
4848

49-
For example, you have `style.css` inside component folder `app/components/Button`, which imports `colors.css`.
49+
For example, you have `style.css` inside directory `app/components/Button`, which imports `colors.css`.
5050

5151
```css
5252
@import "colors.css";
@@ -61,7 +61,7 @@ Here:
6161
- `./app/components/Button` is __base__;
6262
- `./app/components/Button/colors.css` id __module__.
6363

64-
Use regular expressions that would create the condition.
64+
Use regular expressions to create the condition, based on these values:
6565

6666
```js
6767
subImport([{
@@ -109,15 +109,15 @@ subImport([
109109
{
110110
id: /([a-z0-9\.\-]*\.css)$/i,
111111
base: /components/([a-z0-9]*)\/assets\/([a-z0-9]*)$/i,
112-
path: '~/theme/components/[base:$1]/assets/[base:$2]/[id:$1]'
112+
path: '~/theme/components/<base:$1>/assets/<base:$2>/<id:$1>'
113113
}
114114
]);
115115
```
116116

117117
In this case, we get the three aliases:
118-
- `([a-z0-9\.\-]*\.css)` will become `[id:$1]` and will contain required filename;
119-
- First `([a-z0-9]*)` will become `[base:$1]` and will contain component name;
120-
- Second `([a-z0-9]*)` will become `[base:$2]` and will contain some directory inside assets.
118+
- `([a-z0-9\.\-]*\.css)` will become `<id:$1>` and will contain required filename;
119+
- First `([a-z0-9]*)` will become `<base:$1>` and will contain component name;
120+
- Second `([a-z0-9]*)` will become `<base:$2>` and will contain some directory inside assets.
121121

122122
Usage of approach of the regular expression is limited only by your imagination.
123123

0 commit comments

Comments
 (0)