Skip to content

Commit 2d7dfec

Browse files
committed
Refactored files organization.
Added bower.json.
1 parent 65e2283 commit 2d7dfec

File tree

8 files changed

+59
-12
lines changed

8 files changed

+59
-12
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.PHONY: js
22

33
js:
4-
uglifyjs -nc canvas-to-blob.js > canvas-to-blob.min.js
4+
node_modules/.bin/uglifyjs js/canvas-to-blob.js -c -m -o js/canvas-to-blob.min.js

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# JavaScript Canvas to Blob
22

3-
## About
3+
## Description
44
Canvas to Blob is a polyfill for the standard JavaScript [canvas.toBlob](http://www.w3.org/TR/html5/the-canvas-element.html#dom-canvas-toblob) method.
55

66
It can be used to create [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects from an HTML [canvas](https://developer.mozilla.org/en-US/docs/HTML/Canvas) element.
@@ -9,7 +9,7 @@ It can be used to create [Blob](https://developer.mozilla.org/en-US/docs/Web/API
99
Include the (minified) JavaScript Canvas to Blob script in your HTML markup:
1010

1111
```html
12-
<script src="canvas-to-blob.min.js"></script>
12+
<script src="js/canvas-to-blob.min.js"></script>
1313
```
1414

1515
Then use the *canvas.toBlob()* method in the same way as the native implementation:
@@ -64,5 +64,8 @@ The following browsers support either the native or the polyfill *canvas.toBlob(
6464
* Google Chrome on iOS 6.0+
6565
* Google Chrome on Android 4.0+
6666

67+
## Test
68+
[JavaScript Canvas to Blob Test](http://blueimp.github.io/JavaScript-Canvas-to-Blob/test/)
69+
6770
## License
6871
The JavaScript Canvas to Blob script is released under the [MIT license](http://www.opensource.org/licenses/MIT).

bower.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "blueimp-canvas-to-blob",
3+
"version": "2.0.6",
4+
"title": "JavaScript Canvas to Blob",
5+
"description": "JavaScript Canvas to Blob is a function to convert canvas elements into Blob objects.",
6+
"keywords": [
7+
"javascript",
8+
"canvas",
9+
"blob",
10+
"convert",
11+
"conversion"
12+
],
13+
"homepage": "https://github.com/blueimp/JavaScript-Canvas-to-Blob",
14+
"author": {
15+
"name": "Sebastian Tschan",
16+
"url": "https://blueimp.net"
17+
},
18+
"maintainers": [
19+
{
20+
"name": "Sebastian Tschan",
21+
"url": "https://blueimp.net"
22+
}
23+
],
24+
"repository": {
25+
"type": "git",
26+
"url": "git://github.com/blueimp/JavaScript-Canvas-to-Blob.git"
27+
},
28+
"devDependencies": {
29+
"uglify-js": "2.3.6"
30+
},
31+
"bugs": "https://github.com/blueimp/JavaScript-Canvas-to-Blob/issues",
32+
"licenses": [
33+
{
34+
"type": "MIT",
35+
"url": "http://www.opensource.org/licenses/MIT"
36+
}
37+
],
38+
"main": "js/canvas-to-blob.js"
39+
}

canvas-to-blob.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

js/canvas-to-blob.min.js

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

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blueimp-canvas-to-blob",
3-
"version": "2.0.5",
3+
"version": "2.0.6",
44
"title": "JavaScript Canvas to Blob",
55
"description": "JavaScript Canvas to Blob is a function to convert canvas elements into Blob objects.",
66
"keywords": [
@@ -25,12 +25,15 @@
2525
"type": "git",
2626
"url": "git://github.com/blueimp/JavaScript-Canvas-to-Blob.git"
2727
},
28+
"devDependencies": {
29+
"uglify-js": "2.3.6"
30+
},
2831
"bugs": "https://github.com/blueimp/JavaScript-Canvas-to-Blob/issues",
2932
"licenses": [
3033
{
3134
"type": "MIT",
3235
"url": "http://www.opensource.org/licenses/MIT"
3336
}
3437
],
35-
"main": "canvas-to-blob.js"
38+
"main": "js/canvas-to-blob.js"
3639
}

test/index.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE HTML>
22
<!--
33
/*
4-
* JavaScript Canvas to Blob Test 2.0.1
4+
* JavaScript Canvas to Blob Test 2.0.6
55
* https://github.com/blueimp/JavaScript-Canvas-to-Blob
66
*
77
* Copyright 2012, Sebastian Tschan
@@ -13,15 +13,17 @@
1313
-->
1414
<html lang="en">
1515
<head>
16-
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><![endif]-->
16+
<!--[if IE]>
17+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
18+
<![endif]-->
1719
<meta charset="utf-8">
1820
<title>JavaScript Canvas to Blob Test</title>
19-
<meta name="viewport" content="width=device-width">
21+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
2022
<link rel="stylesheet" href="http://blueimp.github.com/cdn/css/mocha.min.css">
2123
</head>
2224
<body>
2325
<div id="mocha"></div>
24-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
26+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
2527
<script src="http://blueimp.github.com/cdn/js/mocha.min.js"></script>
2628
<script src="http://blueimp.github.com/cdn/js/expect.min.js"></script>
2729
<script>
@@ -30,8 +32,8 @@
3032
mocha.run();
3133
});
3234
</script>
33-
<script src="http://blueimp.github.com/JavaScript-Load-Image/load-image.min.js"></script>
34-
<script src="../canvas-to-blob.js"></script>
35+
<script src="http://blueimp.github.io/JavaScript-Load-Image/js/load-image.min.js"></script>
36+
<script src="../js/canvas-to-blob.js"></script>
3537
<script src="test.js"></script>
3638
</body>
3739
</html>

0 commit comments

Comments
 (0)