Skip to content

Commit a84f719

Browse files
committed
Update README.md
1 parent 1eb2cd9 commit a84f719

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,24 @@
99

1010
## Usage
1111

12+
- [Node](#a-Node)
13+
- [PostCSS](#a-PostCSS)
14+
- [Gulp](#Gulp)
15+
- [webpack](#webpack)
16+
1217
Add [Postcss salad] to your build tool:
1318

1419
```bash
1520
npm install postcss-salad --save-dev
1621
```
1722

18-
#### Node
23+
#### [Node](id:a-Node)
1924

2025
```js
2126
require('postcss-salad').process(YOUR_CSS, { /* options */ });
2227
```
2328

24-
#### PostCSS
29+
#### [PostCSS](id:a-PostCSS)
2530

2631
Add [PostCSS] to your build tool:
2732

@@ -37,7 +42,7 @@ postcss([
3742
]).process(YOUR_CSS, /* options */);
3843
```
3944

40-
#### Gulp
45+
#### [Gulp](id:Gulp)
4146

4247
Add [Gulp PostCSS]: to your build tool:
4348

@@ -60,10 +65,25 @@ gulp.task('css', function () {
6065
);
6166
});
6267
```
68+
#### [webpack](id:webpack)
6369

64-
## options
70+
```js
71+
module.exports = {
72+
module: {
73+
loaders: [
74+
{
75+
test: /\.css$/,
76+
loader: "style-loader!css-loader!postcss-loader"
77+
}
78+
]
79+
},
80+
postcss: function () {
81+
return [require('postcss-salad')];
82+
}
83+
}
84+
```
6585

66-
**you can change the plugin's behaviour by the options**
86+
## options
6787

6888
沙拉里每一个特性都是依赖于对应的插件的,因此他们都有自己的配置。 你可以通过 features 属性类为每一个插件传入它的配置,假设某个特性传入的值为false,则该特性会被关闭:
6989

0 commit comments

Comments
 (0)