Skip to content

Commit

Permalink
Added gruntfile
Browse files Browse the repository at this point in the history
  • Loading branch information
verlok committed Mar 19, 2014
1 parent 93d00cd commit de23698
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*global module:false*/
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
// Metadata.
meta: {
version: '2.0.3'
},
banner: '/*! picturePolyfill - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* https://github.com/verlok/picturePolyfill/\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> ' +
'Andrea "verlok" Verlicchi; Licensed MIT */\n',
// Task configuration.
uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
src: 'picturePolyfill.js',
dest: 'picturePolyfill.min.js'
}
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
unused: true,
boss: true,
eqnull: true,
browser: true,
globals: {
jQuery: true
}
},
gruntfile: {
src: 'Gruntfile.js'
},
lib: {
src: ['<%= uglify.dist.src %>']
}
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
lib: {
files: '<%= jshint.lib.src %>',
tasks: ['jshint:lib', 'uglify']
}
}
});

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');

// Default task.
grunt.registerTask('default', ['jshint', 'uglify']);

};

0 comments on commit de23698

Please sign in to comment.