Skip to content

Commit

Permalink
Add grunt task
Browse files Browse the repository at this point in the history
- JSHint
- Run QUnit tests
- Create a minified version, not that its big...
  • Loading branch information
hongymagic committed Jan 22, 2013
1 parent b07477a commit 00e4685
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .jshintrc
@@ -0,0 +1,67 @@
{
"bitwise" : true,
"curly" : true,
"eqeqeq" : false,
"forin" : true,
"immed" : true,
"latedef" : true,
"newcap" : true,
"noarg" : true,
"noempty" : true,
"nonew" : true,
"plusplus" : false,
"regexp" : true,
"undef" : true,
"strict" : false,
"trailing" : true,

"asi" : false,
"boss" : false,
"debug" : false,
"eqnull" : false,
"es5" : false,
"esnext" : false,
"evil" : false,
"expr" : false,
"funcscope" : false,
"globalstrict" : false,
"iterator" : false,
"lastsemic" : false,
"laxbreak" : false,
"laxcomma" : false,
"loopfunc" : false,
"multistr" : false,
"onecase" : false,
"proto" : false,
"regexdash" : false,
"scripturl" : false,
"smarttabs" : false,
"shadow" : false,
"sub" : false,
"supernew" : false,
"validthis" : false,

"browser" : true,
"couch" : false,
"devel" : true,
"dojo" : false,
"jquery" : true,
"mootools" : false,
"node" : true,
"nonstandard" : false,
"prototypejs" : false,
"rhino" : false,
"wsh" : false,

"nomen" : false,
"onevar" : false,
"passfail" : false,
"white" : false,

"maxerr" : 100,
"predef" : [
"test",
"deepEqual"
],
"indent" : 4
}
1 change: 1 addition & 0 deletions dist/jquery.serializeObject.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions grunt.js
@@ -0,0 +1,48 @@

module.exports = function (grunt) {

// Project configuration

grunt.initConfig({
pkg: '<json:serializeObject.jquery.json>',

files: {
all: ['jquery.serializeObject.js'],
tests: ['test/**/*.js']
},

lint: {
all: ['<config:files.all>', '<config:files.tests>']
},

docs: {
all: ['README.markdown']
},

min: {
dist: {
src: '<config:files.all>',
dest: 'dist/jquery.serializeObject.min.js'
}
},

// JSHint options
// See: http://www.jshint.com/options/ for list of options and definitions

jshint: {
options: '<json:.jshintrc>'
},

// QUnit

qunit: {
all: ['test/*.html']
}

});

// Default grunt task

grunt.registerTask('default', 'lint qunit min');

};

0 comments on commit 00e4685

Please sign in to comment.