Skip to content

Commit

Permalink
Add auto-prefixing to CSS
Browse files Browse the repository at this point in the history
Let CanIUse automatically determine what prefixes we need to use.
  • Loading branch information
zackkatz committed May 31, 2018
1 parent 645884e commit cda204f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
18 changes: 15 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ module.exports = function(grunt) {
}
},

postcss: {
options: {
map: false,
processors: [
require('autoprefixer')
]
},
dist: {
src: 'assets/css/*.css'
}
},

jshint: [
"assets/js/admin-views.js",
"assets/js/admin-edd-license.js",
Expand Down Expand Up @@ -134,15 +146,15 @@ module.exports = function(grunt) {
},
extension_scss: {
files: ['includes/extensions/**/*.scss'],
tasks: ['sass:extensions']
tasks: ['sass:extensions', 'postcss:dist']
},
templates: {
files: ['templates/css/**/*.scss','!templates/css/**/*.css'],
tasks: ['sass:templates']
},
scss: {
files: ['assets/css/scss/*.scss'],
tasks: ['sass:dist']
tasks: ['sass:dist', 'postcss:dist']
},
docs: {
files: ['docs/*.scss'],
Expand Down Expand Up @@ -267,7 +279,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-wp-i18n');

// Regular CSS/JS/Image Compression stuff
grunt.registerTask( 'default', [ 'exec:bower', 'sass', 'uglify', 'imagemin', 'translate', 'watch' ] );
grunt.registerTask( 'default', [ 'exec:bower', 'sass', 'postcss', 'uglify', 'imagemin', 'translate', 'watch' ] );

// Translation stuff
grunt.registerTask( 'translate', [ 'exec:transifex', 'potomo', 'addtextdomain', 'makepot' ] );
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
"version": "1.0.0",
"license": "GPL-2.0",
"devDependencies": {
"autoprefixer": "^8.5.2",
"grunt": "^0.4.5",
"grunt-contrib-imagemin": "^1.0.1",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-uglify": "^0.5.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-exec": "^0.4.6",
"grunt-newer": "^1.1.0",
"grunt-postcss": "^0.9.0",
"grunt-potomo": "^3.1.0",
"grunt-sass": "^2.1.0",
"grunt-wp-i18n": "^0.5.1",
Expand All @@ -20,5 +22,8 @@
"type": "git",
"url": "https://github.com/gravityview/GravityView.git"
},
"browserslist": [
"cover 99.7%"
],
"dependencies": {}
}

1 comment on commit cda204f

@zackkatz
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to HS#14999

Please sign in to comment.