Skip to content

Commit

Permalink
Add grunt.js configuration and include some usage instructions in the…
Browse files Browse the repository at this point in the history
… readme
  • Loading branch information
jzaefferer committed Mar 7, 2012
1 parent f959c3d commit 34b0831
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -26,6 +26,17 @@ For related discussions, visit the
Planning for a qunitjs.com site and other testing tools related work now happens
on the [jQuery Testing Team planning wiki](http://jquerytesting.pbworks.com/w/page/41556026/FrontPage).

Development
-----------

To submit patches, fork the repository, create a branch for the change. Then implement
the change, run `grunt` to lint and test it, then commit, push and create a pull request.

Include some background for the change in the commit message and `Fixes #nnn`, referring
to the issue number you're addressing.

To run `grunt`, you need `node` and `npm`, then `npm install grunt -g`.

Releases
--------

Expand Down
44 changes: 44 additions & 0 deletions grunt.js
@@ -0,0 +1,44 @@
/*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(", ") %> */'
},
qunit: {
// TODO include 'test/logs.html' as well
files: ['test/index.html']
},
lint: {
// TODO lint test files: 'test/**/*.js' - needs seperate globals list
files: ['grunt.js', 'qunit/*.js']
},
jshint: {
options: {
bitwise: true,
curly: true,
trailing: true,
immed: true,
latedef: false,
newcap: true,
noarg: false,
noempty: true,
nonew: true,
sub: true,
undef: true,
eqnull: true,
browser: true,
proto: true
},
globals: {
jQuery: true,
exports: true
}
}
});

// Default task.
task.registerTask('default', 'lint qunit');

0 comments on commit 34b0831

Please sign in to comment.