Skip to content

Commit 45c03fb

Browse files
committed
postcss-preset-env
1 parent b545d03 commit 45c03fb

File tree

4 files changed

+220
-247
lines changed

4 files changed

+220
-247
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ on the major tools:
185185
* [React](https://facebook.github.io/react/docs/react-component.html) for
186186
constructing the user interface
187187
* [Redux](http://redux.js.org/) for managing application state
188-
* [cssnext](http://cssnext.io/features/) gives us cutting-edge CSS features
188+
* [postcss-preset-env](https://github.com/csstools/postcss-preset-env) gives us cutting-edge CSS features
189189
* [Block Element Modifier](https://en.bem.info/methodology/naming-convention/)
190190
provides a convention for organizing DOM classes
191191
* [Webpack](https://webpack.github.io/docs/configuration.html) builds the
@@ -265,4 +265,4 @@ src="https://cloud.githubusercontent.com/assets/14214/19059115/428a80f4-89ab-11e
265265

266266
Feel free to email me at [mat.a.brown@gmail.com](mailto:mat.a.brown@gmail.com) if you have any questions.
267267

268-
You can find our Slack team, including our #dev channel, [here](https://slack.popcode.org).
268+
You can find our Slack team, including our #dev channel, [here](https://slack.popcode.org).

gulpfile.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const cssnano = require('cssnano');
1414
const forOwn = require('lodash.forown');
1515
const git = require('git-rev-sync');
1616
const postcss = require('gulp-postcss');
17-
const cssnext = require('postcss-cssnext');
17+
const postcssPresetEnv = require('postcss-preset-env');
1818
const webpack = require('webpack');
1919
const webpackDevMiddleware = require('webpack-dev-middleware');
2020
const cloudflare = require('cloudflare');
@@ -33,17 +33,17 @@ const highlightStylesheetsDir = 'node_modules/highlight.js/styles';
3333
const staticDir = path.join(srcDir, 'static');
3434
const bowerComponents = 'bower_components';
3535

36-
const cssnextBrowsers = [];
36+
const postcssBrowsers = [];
3737
const supportedBrowsers =
3838
JSON.parse(fs.readFileSync('./config/browsers.json'));
3939
forOwn(supportedBrowsers, (version, browser) => {
40-
let browserForCssnext = browser;
40+
let browserForPostcss = browser;
4141
if (browser === 'msie') {
42-
browserForCssnext = 'ie';
42+
browserForPostcss = 'ie';
4343
} else if (browser === 'chromium') {
4444
return;
4545
}
46-
cssnextBrowsers.push(`${browserForCssnext} >= ${version}`);
46+
postcssBrowsers.push(`${browserForPostcss} >= ${version}`);
4747
});
4848

4949
gulp.task('env', () => {
@@ -56,7 +56,7 @@ gulp.task('static', () => gulp.
5656
);
5757

5858
gulp.task('css', () => {
59-
const processors = [cssnext({browsers: cssnextBrowsers})];
59+
const processors = [postcssPresetEnv({browsers: postcssBrowsers})];
6060
if (process.env.NODE_ENV === 'production') {
6161
processors.push(cssnano());
6262
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@
301301
"lodash.forown": "^4.4.0",
302302
"node-static": "^0.7.9",
303303
"null-loader": "^0.1.1",
304-
"postcss-cssnext": "^3.0.2",
304+
"postcss-preset-env": "^5.3.0",
305305
"raw-loader": "^0.5.1",
306306
"redux-saga-test-plan": "^3.0.2",
307307
"script-ext-html-webpack-plugin": "^2.0.1",

0 commit comments

Comments
 (0)