Skip to content

Commit 6861a01

Browse files
committed
Update to grunt 0.4
1 parent e0496c2 commit 6861a01

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

grunt.js Gruntfile.js

+17-27
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,28 @@
11
/*global module:false*/
22
module.exports = function(grunt) {
33

4+
require('load-grunt-tasks')(grunt);
5+
46
// Project configuration.
57
grunt.initConfig({
6-
pkg: '<json:package.json>',
7-
meta: {
8-
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
9-
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
10-
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +
11-
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
12-
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
13-
},
8+
pkg: grunt.file.readJSON('package.json'),
149
concat: {
1510
dist: {
16-
src: ['<banner:meta.banner>', '<file_strip_banner:src/<%= pkg.name %>.js>'],
11+
src: ['src/<%= pkg.name %>.js'],
1712
dest: 'dist/<%= pkg.name %>.js'
1813
}
1914
},
20-
min: {
15+
uglify: {
2116
dist: {
22-
src: ['<banner:meta.banner>', '<config:concat.dist.dest>'],
17+
src: ['<%= concat.dist.dest %>'],
2318
dest: 'dist/<%= pkg.name %>.min.js'
2419
}
2520
},
2621
qunit: {
2722
files: ['test/**/*.html']
2823
},
29-
lint: {
30-
files: ['grunt.js', 'src/**/*.js', 'test/**/*.js']
31-
},
32-
watch: {
33-
files: '<config:lint.files>',
34-
tasks: 'lint qunit'
35-
},
3624
jshint: {
25+
files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
3726
options: {
3827
curly: true,
3928
eqeqeq: true,
@@ -45,19 +34,19 @@ module.exports = function(grunt) {
4534
undef: true,
4635
boss: true,
4736
eqnull: true,
48-
browser: true
49-
},
50-
globals: {
51-
jQuery: true,
52-
define: true,
53-
require: true
37+
browser: true,
38+
globals: {
39+
jQuery: true,
40+
define: true,
41+
ok: true,
42+
require: true
43+
}
5444
}
55-
},
56-
uglify: {}
45+
}
5746
});
5847

5948
// Default task.
60-
grunt.registerTask('default', 'lint qunit concat min manifest');
49+
grunt.registerTask('default', ['jshint','qunit', 'concat', 'uglify', 'manifest']);
6150

6251
grunt.registerTask( "manifest", function() {
6352
var pkg = grunt.config( "pkg" );
@@ -81,4 +70,5 @@ module.exports = function(grunt) {
8170
}
8271
}, null, " " ) );
8372
});
73+
8474
};

package.json

+18-8
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
"email": "[email protected]",
1010
"url": "http://www.johnkpaul.com"
1111
},
12-
"maintainers": [{
13-
"name": "John Paul",
14-
"email": "[email protected]",
15-
"url": "http://www.johnkpaul.com"
16-
}],
12+
"maintainers": [
13+
{
14+
"name": "John Paul",
15+
"email": "[email protected]",
16+
"url": "http://www.johnkpaul.com"
17+
}
18+
],
1719
"repository": {
1820
"type": "git",
1921
"url": "git://github.com/johnkpaul/jquery-ajax-retry.git"
@@ -28,11 +30,19 @@
2830
}
2931
],
3032
"dependencies": {
31-
"jquery": "~1.5"
33+
"jquery": "~1.5",
34+
"grunt-contrib-qunit": "~0.5.1",
35+
"grunt-contrib-concat": "~0.4.0"
3236
},
3337
"devDependencies": {
34-
"grunt": "~0.3.15"
38+
"grunt": "~0.4.5",
39+
"load-grunt-tasks": "~0.5.0",
40+
"grunt-contrib-uglify": "~0.5.0",
41+
"grunt-contrib-jshint": "~0.10.0"
3542
},
36-
"keywords": [ "ajax", "retry" ],
43+
"keywords": [
44+
"ajax",
45+
"retry"
46+
],
3747
"main": "src/jquery.ajax-retry.js"
3848
}

0 commit comments

Comments
 (0)