@@ -61,7 +61,7 @@ If you were using cssnext with default options, you might just need this:
61
61
62
62
``` console
63
63
$ npm uninstall cssnext [--save[-dev]]
64
- $ npm install postcss postcss-import postcss-url postcss-reporter postcss-browser-reporter postcss-cssnext [--save[-dev]]
64
+ $ npm install postcss postcss-import postcss-url postcss-cssnext postcss-browser-reporter postcss-reporter [--save[-dev]]
65
65
```
66
66
67
67
With the previous lines you might thing that you are going backward by having a
@@ -73,15 +73,23 @@ and previous default cssnext behavior.
73
73
74
74
##### [ postcss-cli] ( https://www.npmjs.com/package/postcss-cli )
75
75
76
+ ``` console
77
+ $ npm install postcss-cli --save-dev
78
+ ```
79
+
76
80
Here is an example of the json config you might use with something like
77
81
`` $ postcss-cli -c postcss.config.json `` .
78
82
79
- ``` json
83
+ ``` js
80
84
{
81
85
" use" : [
82
86
" postcss-import" ,
83
87
" postcss-url" ,
84
- " postcss-cssnext"
88
+ " postcss-cssnext" ,
89
+ // add your "plugins" here
90
+ // ...
91
+ // and if you want to compress
92
+ // "cssnano",
85
93
" postcss-browser-reporter" ,
86
94
" postcss-reporter" ,
87
95
]
@@ -90,6 +98,11 @@ Here is an example of the json config you might use with something like
90
98
91
99
##### [ grunt-postcss] ( https://www.npmjs.com/package/grunt-postcss )
92
100
101
+ ``` console
102
+ $ npm uninstall grunt-cssnext --save-dev
103
+ $ npm install grunt-postcss --save-dev
104
+ ```
105
+
93
106
``` js
94
107
grunt .initConfig ({
95
108
postcss: {
@@ -98,6 +111,10 @@ grunt.initConfig({
98
111
require (" postcss-import" )(),
99
112
require (" postcss-url" )(),
100
113
require (" postcss-cssnext" )(),
114
+ // add your "plugins" here
115
+ // ...
116
+ // and if you want to compress
117
+ // require("cssnano")(),
101
118
require (" postcss-browser-reporter" )(),
102
119
require (" postcss-reporter" )(),
103
120
]
@@ -111,6 +128,11 @@ grunt.initConfig({
111
128
112
129
##### [ gulp-postcss] ( https://www.npmjs.com/package/gulp-postcss )
113
130
131
+ ``` console
132
+ $ npm uninstall gulp-cssnext --save-dev
133
+ $ npm install gulp-postcss --save-dev
134
+ ```
135
+
114
136
``` js
115
137
var gulp = require (' gulp' )
116
138
var postcss = require (' gulp-postcss' )
@@ -122,6 +144,10 @@ gulp.task('css', function () {
122
144
require (" postcss-import" )(),
123
145
require (" postcss-url" )(),
124
146
require (" postcss-cssnext" )(),
147
+ // add your "plugins" here
148
+ // ...
149
+ // and if you want to compress
150
+ // require("cssnano")(),
125
151
require (" postcss-browser-reporter" )(),
126
152
require (" postcss-reporter" )(),
127
153
]))
@@ -132,6 +158,11 @@ gulp.task('css', function () {
132
158
133
159
##### [ postcss-loader] ( https://www.npmjs.com/package/postcss-loader )
134
160
161
+ ``` console
162
+ $ npm uninstall cssnext-loader --save-dev
163
+ $ npm install postcss-loader --save-dev
164
+ ```
165
+
135
166
``` js
136
167
module .exports = {
137
168
module: {
@@ -147,6 +178,10 @@ module.exports = {
147
178
require (" postcss-import" )({ addDependencyTo: webpack }),
148
179
require (" postcss-url" )(),
149
180
require (" postcss-cssnext" )(),
181
+ // add your "plugins" here
182
+ // ...
183
+ // and if you want to compress,
184
+ // just use css-loader option that already use cssnano under the hood
150
185
require (" postcss-browser-reporter" )(),
151
186
require (" postcss-reporter" )(),
152
187
]
0 commit comments