Skip to content

Instantly share code, notes, and snippets.

@boazsender
Created February 21, 2012 00:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boazsender/1872458 to your computer and use it in GitHub Desktop.
Save boazsender/1872458 to your computer and use it in GitHub Desktop.
Example gruntfile.
/*global config:true, task:true*/
config.init({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= template.today("m/d/yyyy") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
'* Copyright (c) <%= template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},
concat: {
'dist/grunt-jquery-example.js': ['<banner>', '<file_strip_banner:src/grunt-jquery-example.js>']
},
min: {
'dist/grunt-jquery-example.min.js': ['<banner>', 'dist/grunt-jquery-example.js']
},
qunit: {
files: ['test/**/*.html']
},
lint: {
files: ['grunt.js', 'src/**/*.js', 'test/**/*.js']
},
watch: {
files: '<config:lint.files>',
tasks: 'lint qunit'
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
eqnull: true,
browser: true
},
globals: {
jQuery: true
}
},
uglify: {}
});
// Default task.
task.registerTask('default', 'lint qunit concat min');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment