Skip to content
Snippets Groups Projects
Commit cc19a72e authored by Andreas Kienast's avatar Andreas Kienast Committed by Frank Nägler
Browse files

[TASK] Use autoprefixer

Add postcss to run autoprefixer for
- last two browser generations
- Firefox ESR
- IE 9

This will drop vendor prefixes for browsers that are unsupported
with TYPO3 CMS (mostly IE 8 only) and vice versa.

Resolves: #70150
Releases: master
Change-Id: I2a4e02e3d57de7b682ca089e4d91dd1a071efc87
Reviewed-on: http://review.typo3.org/43610


Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarFrank Nägler <frank.naegler@typo3.org>
Tested-by: default avatarFrank Nägler <frank.naegler@typo3.org>
parent a44b53fd
No related branches found
No related tags found
No related merge requests found
......@@ -50,10 +50,27 @@ module.exports = function(grunt) {
}
}
},
postcss: {
options: {
map: false,
processors: [
require('autoprefixer')({ // add vendor prefixes
browsers: [
'Last 2 versions',
'Firefox ESR',
'IE 9'
]
})
]
},
t3skin: {
src: '<%= paths.t3skin %>Public/Css/*.css'
}
},
watch: {
less: {
files: '<%= paths.less %>**/*.less',
tasks: 'less'
tasks: 'css'
}
},
bowercopy: {
......@@ -300,15 +317,27 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-bower-just-install');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-svgmin');
grunt.loadNpmTasks('grunt-postcss');
/**
* grunt default task
*
* call "$ grunt"
*
* this will trigger the less build
* this will trigger the CSS build
*/
grunt.registerTask('default', ['css']);
/**
* grunt css task
*
* call "$ grunt css"
*
* this task does the following things:
* - less
* - postcss
*/
grunt.registerTask('default', ['less']);
grunt.registerTask('css', ['less', 'postcss']);
/**
* grunt update task
......@@ -316,7 +345,7 @@ module.exports = function(grunt) {
* call "$ grunt update"
*
* this task does the following things:
* - npn install
* - npm install
* - bower install
* - copy some bower components to a specific destinations because they need to be included via PHP
*/
......@@ -333,5 +362,5 @@ module.exports = function(grunt) {
* - uglify js files
* - minifies svg files
*/
grunt.registerTask('build', ['update', 'less', 'uglify', 'svgmin']);
grunt.registerTask('build', ['update', 'css', 'uglify', 'svgmin']);
};
......@@ -8,13 +8,15 @@
"version": "7.5.0-dev",
"license": "GPL-2.0+",
"devDependencies": {
"autoprefixer": "^6.0.3",
"grunt": "~0.4.5",
"grunt-bower-just-install": "0.0.3",
"grunt-bowercopy": "^1.2.0",
"grunt-contrib-less": "~1.0.0",
"grunt-contrib-uglify": "0.9.1",
"grunt-contrib-watch": "~0.6.1",
"grunt-svgmin": "2.0.1",
"grunt-npm-install": "^0.2.0"
"grunt-npm-install": "^0.2.0",
"grunt-postcss": "^0.6.0",
"grunt-svgmin": "2.0.1"
}
}
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment