Skip to content

Commit 5e3a24d

Browse files
committed
Migrate to Grunt v0.4.0
min to uglify zip to grunt-zipstream lint to jshint Install grunt-cli for Travis-CI Fix license header
1 parent bcff73a commit 5e3a24d

File tree

5 files changed

+136
-127
lines changed

5 files changed

+136
-127
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
language: node_js
22
node_js:
3-
- 0.8
3+
- 0.8
4+
install:
5+
- npm install grunt-cli -g
6+
- npm install

Gruntfile.js

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
/*global module: true, require: true*/
2+
module.exports = function(grunt) {
3+
4+
grunt.initConfig({
5+
pkg: grunt.file.readJSON('package.json'),
6+
concat: {
7+
dist: {
8+
files: {
9+
'dist/jquery.validate.js': ['jquery.validate.js'],
10+
'dist/additional-methods.js': ['additional-methods.js']
11+
}
12+
}
13+
},
14+
uglify: {
15+
options: {
16+
preserveComments: false,
17+
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
18+
'<%= grunt.template.today("m/d/yyyy") %>\\n' +
19+
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
20+
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
21+
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
22+
},
23+
all: {
24+
files: {
25+
'dist/jquery.validate.min.js': ['dist/jquery.validate.js'],
26+
'dist/additional-methods.min.js': ['dist/additional-methods.js']
27+
}
28+
}
29+
},
30+
zip: {
31+
dist: {
32+
src: [
33+
'dist/additional-methods.js',
34+
'dist/additional-methods.min.js',
35+
'dist/jquery.validate.js',
36+
'dist/jquery.validate.min.js',
37+
'README.md',
38+
'changelog.txt',
39+
'grunt.js',
40+
'package.json',
41+
'demo/**/*.*',
42+
'lib/**/*.*',
43+
'localization/**/*.*',
44+
'test/**/*.*'
45+
],
46+
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.zip'
47+
},
48+
options: {
49+
zlib: {
50+
level: 1
51+
}
52+
}
53+
},
54+
qunit: {
55+
files: ['test/index.html']
56+
},
57+
jshint: {
58+
options: {
59+
curly: true,
60+
eqeqeq: true,
61+
immed: true,
62+
latedef: true,
63+
newcap: true,
64+
noarg: true,
65+
sub: true,
66+
undef: true,
67+
eqnull: true,
68+
browser: true,
69+
globals: {
70+
jQuery: true,
71+
$: true,
72+
console: true
73+
}
74+
},
75+
files: [
76+
'jquery.validate.js',
77+
'additional-methods.js',
78+
'localization/*.js'
79+
],
80+
test: {
81+
options: {
82+
globals: {
83+
jQuery: true,
84+
$: true,
85+
QUnit: true,
86+
module: true,
87+
test: true,
88+
start: true,
89+
stop: true,
90+
expect: true,
91+
ok: true,
92+
equal: true,
93+
deepEqual: true,
94+
strictEqual: true
95+
}
96+
},
97+
files: {
98+
src: [
99+
'test/test.js',
100+
'test/rules.js',
101+
'test/messages.js',
102+
'test/methods.js'
103+
]
104+
}
105+
},
106+
grunt: {
107+
files: {
108+
src: [
109+
'Gruntfile.js'
110+
]
111+
}
112+
}
113+
}
114+
});
115+
116+
grunt.registerTask('default', ['jshint', 'qunit']);
117+
grunt.registerTask('release', ['default', 'concat', 'uglify', 'zip']);
118+
grunt.loadNpmTasks('grunt-contrib-jshint');
119+
grunt.loadNpmTasks('grunt-contrib-qunit');
120+
grunt.loadNpmTasks('grunt-contrib-uglify');
121+
grunt.loadNpmTasks('grunt-contrib-concat');
122+
grunt.loadNpmTasks('grunt-zipstream');
123+
};

grunt.js

Lines changed: 0 additions & 121 deletions
This file was deleted.

jquery.validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*!
22
* jQuery Validation Plugin 1.12.0pre
33
*
44
* http://bassistance.de/jquery-plugins/jquery-plugin-validation/

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,20 @@
2323
}
2424
],
2525
"scripts": {
26-
"test": "grunt lint qunit"
26+
"test": "grunt jshint qunit"
2727
},
2828
"dependencies": {},
2929
"devDependencies": {
30-
"grunt": "0.3.x",
31-
"zipstream": "0.2.x"
30+
"grunt": "0.4.x",
31+
"grunt-contrib-qunit": "~0.1.1",
32+
"grunt-contrib-jshint": "~0.1.1",
33+
"grunt-contrib-uglify": "~0.1.1",
34+
"grunt-contrib-concat": "~0.1.3",
35+
"grunt-zipstream": "~0.2.2"
3236
},
3337
"keywords": [
3438
"forms",
3539
"validation",
3640
"validate"
3741
]
38-
}
42+
}

0 commit comments

Comments
 (0)