Skip to content

Commit dc11908

Browse files
committed
Replaced Makefile with Grunt tasks.
1 parent 2994070 commit dc11908

File tree

6 files changed

+166
-96
lines changed

6 files changed

+166
-96
lines changed

Gruntfile.js

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* JavaScript MD5 Gruntfile
3+
* https://github.com/blueimp/JavaScript-MD5
4+
*
5+
* Copyright 2013, Sebastian Tschan
6+
* https://blueimp.net
7+
*
8+
* Licensed under the MIT license:
9+
* http://www.opensource.org/licenses/MIT
10+
*/
11+
12+
/*global module */
13+
14+
module.exports = function (grunt) {
15+
'use strict';
16+
17+
grunt.initConfig({
18+
jshint: {
19+
all: [
20+
'Gruntfile.js',
21+
'js/demo.js',
22+
'js/md5.js',
23+
'test/test.js'
24+
]
25+
},
26+
simplemocha: {
27+
options: {
28+
ignoreLeaks: false,
29+
ui: 'bdd',
30+
reporter: 'spec'
31+
},
32+
all: {
33+
src: ['test/test.js']
34+
}
35+
},
36+
mocha: {
37+
all: {
38+
src: ['test/index.html'],
39+
options: {
40+
run: true,
41+
bail: true,
42+
log: true,
43+
reporter: 'Spec'
44+
},
45+
mocha: {
46+
ignoreLeaks: false
47+
}
48+
}
49+
},
50+
uglify: {
51+
production: {
52+
src: [
53+
'js/md5.js'
54+
],
55+
dest: 'js/md5.min.js'
56+
}
57+
}
58+
});
59+
60+
grunt.loadNpmTasks('grunt-contrib-jshint');
61+
grunt.loadNpmTasks('grunt-simple-mocha');
62+
grunt.loadNpmTasks('grunt-mocha');
63+
grunt.loadNpmTasks('grunt-contrib-uglify');
64+
grunt.loadNpmTasks('grunt-bump-build-git');
65+
66+
grunt.registerTask('test', ['jshint', 'simplemocha', 'mocha']);
67+
grunt.registerTask('default', ['test', 'uglify']);
68+
69+
};

Makefile

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

bower.json

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,45 @@
11
{
2-
"name": "blueimp-md5",
3-
"version": "1.0.3",
4-
"title": "JavaScript MD5",
5-
"description": "JavaScript MD5 implementation.",
6-
"keywords": [
7-
"javascript",
8-
"md5"
9-
],
10-
"homepage": "https://github.com/blueimp/JavaScript-MD5",
11-
"author": {
12-
"name": "Sebastian Tschan",
13-
"url": "https://blueimp.net"
14-
},
15-
"maintainers": [
16-
{
17-
"name": "Sebastian Tschan",
18-
"url": "https://blueimp.net"
19-
}
20-
],
21-
"contributors": [
22-
{
23-
"name": "Paul Johnston",
24-
"url": "http://pajhome.org.uk/crypt/md5"
25-
}
26-
],
27-
"repository": {
28-
"type": "git",
29-
"url": "git://github.com/blueimp/JavaScript-MD5.git"
30-
},
31-
"bugs": "https://github.com/blueimp/JavaScript-MD5/issues",
32-
"licenses": [
33-
{
34-
"type": "MIT",
35-
"url": "http://www.opensource.org/licenses/MIT"
36-
}
37-
],
38-
"devDependencies": {
39-
"mocha": "1.11.0",
40-
"expect.js": "0.2.0",
41-
"uglify-js": "2.3.6"
42-
},
43-
"main": "js/md5.js"
2+
"name": "blueimp-md5",
3+
"version": "1.1.0",
4+
"title": "JavaScript MD5",
5+
"description": "JavaScript MD5 implementation.",
6+
"keywords": [
7+
"javascript",
8+
"md5"
9+
],
10+
"homepage": "https://github.com/blueimp/JavaScript-MD5",
11+
"author": {
12+
"name": "Sebastian Tschan",
13+
"url": "https://blueimp.net"
14+
},
15+
"maintainers": [
16+
{
17+
"name": "Sebastian Tschan",
18+
"url": "https://blueimp.net"
19+
}
20+
],
21+
"contributors": [
22+
{
23+
"name": "Paul Johnston",
24+
"url": "http://pajhome.org.uk/crypt/md5"
25+
}
26+
],
27+
"repository": {
28+
"type": "git",
29+
"url": "git://github.com/blueimp/JavaScript-MD5.git"
30+
},
31+
"bugs": "https://github.com/blueimp/JavaScript-MD5/issues",
32+
"licenses": [
33+
{
34+
"type": "MIT",
35+
"url": "http://www.opensource.org/licenses/MIT"
36+
}
37+
],
38+
"main": "js/md5.js",
39+
"ignore": [
40+
"/*.*",
41+
"css",
42+
"js/demo.js",
43+
"test"
44+
]
4445
}

js/md5.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 49 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,51 @@
11
{
2-
"name": "blueimp-md5",
3-
"version": "1.0.3",
4-
"title": "JavaScript MD5",
5-
"description": "JavaScript MD5 implementation.",
6-
"keywords": [
7-
"javascript",
8-
"md5"
9-
],
10-
"homepage": "https://github.com/blueimp/JavaScript-MD5",
11-
"author": {
12-
"name": "Sebastian Tschan",
13-
"url": "https://blueimp.net"
14-
},
15-
"maintainers": [
16-
{
17-
"name": "Sebastian Tschan",
18-
"url": "https://blueimp.net"
19-
}
20-
],
21-
"contributors": [
22-
{
23-
"name": "Paul Johnston",
24-
"url": "http://pajhome.org.uk/crypt/md5"
25-
}
26-
],
27-
"repository": {
28-
"type": "git",
29-
"url": "git://github.com/blueimp/JavaScript-MD5.git"
30-
},
31-
"bugs": "https://github.com/blueimp/JavaScript-MD5/issues",
32-
"licenses": [
33-
{
34-
"type": "MIT",
35-
"url": "http://www.opensource.org/licenses/MIT"
36-
}
37-
],
38-
"devDependencies": {
39-
"mocha": "1.11.0",
40-
"expect.js": "0.2.0",
41-
"uglify-js": "2.3.6"
42-
},
43-
"scripts": {
44-
"test": "mocha --reporter spec"
45-
},
46-
"main": "js/md5.js"
2+
"name": "blueimp-md5",
3+
"version": "1.1.0",
4+
"title": "JavaScript MD5",
5+
"description": "JavaScript MD5 implementation.",
6+
"keywords": [
7+
"javascript",
8+
"md5"
9+
],
10+
"homepage": "https://github.com/blueimp/JavaScript-MD5",
11+
"author": {
12+
"name": "Sebastian Tschan",
13+
"url": "https://blueimp.net"
14+
},
15+
"maintainers": [
16+
{
17+
"name": "Sebastian Tschan",
18+
"url": "https://blueimp.net"
19+
}
20+
],
21+
"contributors": [
22+
{
23+
"name": "Paul Johnston",
24+
"url": "http://pajhome.org.uk/crypt/md5"
25+
}
26+
],
27+
"repository": {
28+
"type": "git",
29+
"url": "git://github.com/blueimp/JavaScript-MD5.git"
30+
},
31+
"bugs": "https://github.com/blueimp/JavaScript-MD5/issues",
32+
"licenses": [
33+
{
34+
"type": "MIT",
35+
"url": "http://www.opensource.org/licenses/MIT"
36+
}
37+
],
38+
"devDependencies": {
39+
"grunt": "~0.4.1",
40+
"grunt-contrib-uglify": "~0.2.7",
41+
"grunt-contrib-jshint": "~0.7.1",
42+
"grunt-bump-build-git": "~1.0.0",
43+
"grunt-simple-mocha": "~0.4.0",
44+
"grunt-mocha": "~0.4.1",
45+
"expect.js": "0.2.0"
46+
},
47+
"scripts": {
48+
"test": "grunt test"
49+
},
50+
"main": "js/md5.js"
4751
}

test/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
<script src="../js/md5.js"></script>
3232
<script src="test.js"></script>
3333
<script>
34-
mocha.checkLeaks();
35-
mocha.run();
34+
if (!window.PHANTOMJS) {
35+
mocha.checkLeaks();
36+
mocha.run();
37+
}
3638
</script>
3739
</body>
3840
</html>

0 commit comments

Comments
 (0)