Skip to content

Commit

Permalink
Issue webcompat#900 - grunt-cssnext is deprecated, added postcss-cssnext
Browse files Browse the repository at this point in the history
  • Loading branch information
magsout authored and daliacoss committed Mar 29, 2016
1 parent 71f1f5c commit 6664229
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ module.exports = function(grunt) {

// Default task.
grunt.registerTask('default', [
'checkDependencies', 'eslint', 'concat', 'uglify','cssnext', 'cssmin'
'checkDependencies', 'eslint', 'concat', 'uglify','postcss', 'cssmin'
]);

// Task used before doing a deploy (same as default, but does image optimization)
grunt.registerTask('deploy', [
'checkDependencies', 'eslint', 'concat', 'uglify','cssnext', 'cssmin', 'imagemin'
'checkDependencies', 'eslint', 'concat', 'uglify','postcss', 'cssmin', 'imagemin'
]);
};
16 changes: 10 additions & 6 deletions grunt-tasks/cssnext.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

module.exports = function(grunt) {
grunt.config('cssnext', {
grunt.config('postcss', {
options: {
sourcemap: true,
url : false,
browsers: ['ff >= 4', 'ie >= 8', 'safari >= 5.1', 'opera >= 12', 'chrome >=10'],
import: { path: ['node_modules'] },
messages: {browser: false, console: true}
map: true,
processors: [
require('postcss-import')(),
require('postcss-cssnext')({
browsers: ['ff >= 20', 'ie >= 10', 'safari >= 7', 'opera >= 12', 'chrome >=30'],
}),
require('postcss-browser-reporter')(),
require('postcss-reporter')(),
]
},
dist: {
files: {
Expand Down
2 changes: 1 addition & 1 deletion grunt-tasks/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function(grunt) {
grunt.config('watch', {
css:{
files: '<%= cssPath %>/development/**/*.css',
tasks: ['cssnext']
tasks: ['postcss']
},
script:{
files: '<%= jshint.beforeconcat %>',
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@
"grunt-contrib-imagemin": "~1.0.0",
"grunt-contrib-uglify": "~0.2.7",
"grunt-contrib-watch": "~0.5.3",
"grunt-cssnext": "^1.0.0",
"grunt-eslint": "^17.3.1",
"grunt-postcss": "^0.8.0",
"intern": "2.2.0",
"load-grunt-tasks": "~0.6.0",
"postcss": "^5.0.19",
"postcss-browser-reporter": "^0.4.0",
"postcss-cssnext": "^2.4.0",
"postcss-import": "^8.0.2",
"postcss-reporter": "^1.3.3",
"postcss-url": "^5.1.1",
"suitcss-utils-align": "^0.2.0",
"suitcss-utils-display": "^0.4.0"
}
Expand Down

0 comments on commit 6664229

Please sign in to comment.