Add grunt-autoprefixer

This commit is contained in:
Ben Word
2014-03-30 20:12:30 -05:00
parent 0f606929e0
commit bb604f36b8
2 changed files with 26 additions and 10 deletions

View File

@@ -40,7 +40,7 @@ module.exports = function(grunt) {
compress: false, compress: false,
// LESS source map // LESS source map
// To enable, set sourceMap to true and update sourceMapRootpath based on your install // To enable, set sourceMap to true and update sourceMapRootpath based on your install
sourceMap: false, sourceMap: true,
sourceMapFilename: 'assets/css/main.css.map', sourceMapFilename: 'assets/css/main.css.map',
sourceMapRootpath: '/app/themes/roots/' sourceMapRootpath: '/app/themes/roots/'
} }
@@ -72,6 +72,20 @@ module.exports = function(grunt) {
} }
} }
}, },
autoprefixer: {
options: {
browsers: ['last 2 versions', 'ie 8', 'ie 9', 'android 2.3', 'android 4', 'opera 12']
},
dev: {
options: {
map: 'assets/css/'
},
src: 'assets/css/main.css'
},
build: {
src: 'assets/css/main.min.css'
}
},
modernizr: { modernizr: {
build: { build: {
devFile: 'assets/vendor/modernizr/modernizr.js', devFile: 'assets/vendor/modernizr/modernizr.js',
@@ -128,8 +142,8 @@ module.exports = function(grunt) {
}, },
clean: { clean: {
dist: [ dist: [
'assets/css/*main*.min.css', 'assets/css/main.min.*.css',
'assets/js/*scripts*.min.js' 'assets/js/scripts.min.*.js'
] ]
} }
}); });
@@ -144,16 +158,17 @@ module.exports = function(grunt) {
grunt.registerTask('dev', [ grunt.registerTask('dev', [
'jshint', 'jshint',
'less:dev', 'less:dev',
'autoprefixer:dev',
'concat' 'concat'
]); ]);
grunt.registerTask('build', [ grunt.registerTask('build', [
'jshint', 'jshint',
'clean', 'clean',
'less:build', 'less:build',
'autoprefixer:build',
'uglify', 'uglify',
'modernizr', 'modernizr',
'filerev', 'filerev',
'filerev_assets' 'filerev_assets'
]); ]);
}; };

View File

@@ -25,14 +25,15 @@
"devDependencies": { "devDependencies": {
"bower": "~1.2.8", "bower": "~1.2.8",
"grunt": "~0.4.2", "grunt": "~0.4.2",
"grunt-contrib-clean": "~0.5.0", "grunt-autoprefixer": "~0.7.2",
"grunt-contrib-jshint": "~0.6.4",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-less": "~0.8.1",
"grunt-filerev": "~0.2.1", "grunt-filerev": "~0.2.1",
"grunt-filerev-assets": "~0.3.0", "grunt-filerev-assets": "~0.3.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-jshint": "~0.6.4",
"grunt-contrib-less": "~0.8.1",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-watch": "~0.5.3",
"grunt-modernizr": "~0.5.1", "grunt-modernizr": "~0.5.1",
"load-grunt-tasks": "~0.3.0" "load-grunt-tasks": "~0.3.0"
} }