Skip to content

Commit

Permalink
Update modernizr and the grunt builder for it.
Browse files Browse the repository at this point in the history
Grunt-modernizr-builder doesn't require to download modernizr complete
source separately and adds only customized version to project.
  • Loading branch information
Kaspar Naaber committed Nov 11, 2015
1 parent e1b7f0e commit 5285582
Show file tree
Hide file tree
Showing 6 changed files with 1,087 additions and 346 deletions.
20 changes: 8 additions & 12 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON('package.json'),

// Builds custom modernizr script.
modernizr: {
modernizr_builder: {
build: {
'devFile' : 'bower_components/modernizr/modernizr.js',
'outputFile' : 'javascripts/modernizr.js',

'tests': [
'flexbox',
'svg'
],

'uglify' : false
options: {
config: 'modernizr-config.json',
dest: 'javascripts/modernizr.js',
uglify: false
}
}
},

Expand Down Expand Up @@ -148,10 +144,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-modernizr');
grunt.loadNpmTasks('grunt-modernizr-builder');
grunt.loadNpmTasks('grunt-svgmin');

grunt.registerTask('default', ['modernizr', 'concat', 'uglify', 'sass', 'cssmin', 'imagemin', 'svgmin']);
grunt.registerTask('default', ['modernizr_builder:build', 'concat', 'uglify', 'sass', 'cssmin', 'imagemin', 'svgmin']);

grunt.event.on('watch', function(action, filepath, target) {
if (target == 'voog') {
Expand Down
2 changes: 1 addition & 1 deletion Package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"grunt-contrib-uglify": "^0.9.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-exec": "^0.4.6",
"grunt-modernizr": "^0.6.0",
"grunt-modernizr-builder": "^0.1.7",
"grunt-svgmin": "^2.0.1"
}
}
1 change: 0 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
},
"dependencies": {
"jquery": "~1.11.0",
"modernizr": "~2.8.3",
"overthrow": "~0.7.0"
}
}
Loading

0 comments on commit 5285582

Please sign in to comment.