Skip to content

Commit d6a749a

Browse files
committed
Merge branch 'release/1.0.10'
2 parents 5c6f3f6 + c60a54b commit d6a749a

File tree

11 files changed

+39
-24
lines changed

11 files changed

+39
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/node_modules
2+
npm-debug.log

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "test/qunit"]
22
path = test/qunit
3-
url = git@github.com:jquery/qunit.git
3+
url = https://github.com/jquery/qunit.git

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
language: node_js

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
= 1.0.10
2+
* Fixed iOS 10 API deprication (#17)
3+
* Add Travis CI
4+
* Include minified build in release
5+
16
= 1.0.9
27
* True fix for issue with lineWidth handling in stroke (#14)
38

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Yay, you're interested in helping this thing suck less. Good for you!
55
Some things you should be familiar with before getting started
66

77
- Unit testing (with [QUnit](http://qunitjs.com))
8-
- [Grunt](http://gruntjs.org) (available via `npm install -g grunt-cli`)
8+
- [Grunt](http://gruntjs.org)
99
- [Node/NPM](https://npmjs.org/) (available via homebrew)
1010

1111
## Project Layout
@@ -17,15 +17,15 @@ Some things you should be familiar with before getting started
1717

1818
## Development
1919

20-
Once you have NPM and Grunt installed, clone the repository (with `--recursive` to also clone all submodules) and install all dependencies
20+
Once you have npm installed, clone the repository (with `--recursive` to also clone all submodules) and install all dependencies
2121

2222
git clone git@.....hidpi-canvas-polyfill.git --recursive
2323
cd hidpi-canvas-polyfill
2424
npm install
2525

26-
Then to build a distribution run this grunt task
26+
Then to build a distribution run
2727

28-
grunt dist
28+
npm run build
2929

3030
This will generate the compiled (and minified) sourc in your `dist/` directory
3131
along with a distributable zip archive.
@@ -35,7 +35,7 @@ need to re-run this command.
3535

3636
You can also use
3737

38-
grunt watch
38+
npm run watch
3939

4040
to automatically reconcat the unminified file everytime you
4141
change any of the `src/**/*.js` files.
@@ -49,7 +49,7 @@ sure to organize and produce tests that fit the patterns present.
4949

5050
### Running Tests
5151

52-
grunt test
52+
npm test
5353

5454
## On Contribution
5555

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# HiDPI Canvas Polyfill
22

3+
[![Build Status](https://travis-ci.org/jondavidjohn/hidpi-canvas-polyfill.svg?branch=master)](https://travis-ci.org/jondavidjohn/hidpi-canvas-polyfill)
4+
35
This is a drop-in polyfill to scale canvas appropriately to maintain sharpness
46
in browsers that currently do not provide the appropriately scaled backing
57
store to do this automatically.
@@ -14,7 +16,7 @@ without having to modify any of your canvas code.
1416
Currently this plugin handles most general cross browser drawing functions, but
1517
feel free to send Pull Requests as you find functions you need supported.
1618

17-
If the function simply needs all or some of it's arguments multiplied by the ratio,
19+
If the function simply needs all or some of its arguments multiplied by the ratio,
1820
it should simply require you to add it to the `ratioArgs` object, following the proper
1921
pattern.
2022

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hidpi-canvas",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"homepage": "https://github.com/jondavidjohn/hidpi-canvas-polyfill",
55
"authors": [
66
"Jonathan Johnson <jon@crowdfavorite.com>"
@@ -13,7 +13,7 @@
1313
"polyfill"
1414
],
1515
"main": "dist/hidpi-canvas.js",
16-
"license": "Apache 2.0",
16+
"license": "Apache-2.0",
1717
"ignore": [
1818
"**/.*",
1919
"node_modules",

dist/hidpi-canvas.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
/**
2-
* HiDPI Canvas Polyfill (1.0.9)
2+
* HiDPI Canvas Polyfill (1.0.10)
33
*
44
* Author: Jonathan D. Johnson (http://jondavidjohn.com)
55
* Homepage: https://github.com/jondavidjohn/hidpi-canvas-polyfill
66
* Issue Tracker: https://github.com/jondavidjohn/hidpi-canvas-polyfill/issues
7-
* License: Apache 2.0
7+
* License: Apache-2.0
88
*/
99
(function(prototype) {
1010

11-
var pixelRatio = (function(context) {
12-
var backingStore = context.backingStorePixelRatio ||
11+
var pixelRatio = (function() {
12+
var canvas = document.createElement('canvas'),
13+
context = canvas.getContext('2d'),
14+
backingStore = context.backingStorePixelRatio ||
1315
context.webkitBackingStorePixelRatio ||
1416
context.mozBackingStorePixelRatio ||
1517
context.msBackingStorePixelRatio ||
1618
context.oBackingStorePixelRatio ||
1719
context.backingStorePixelRatio || 1;
1820

1921
return (window.devicePixelRatio || 1) / backingStore;
20-
})(prototype),
22+
})(),
2123

2224
forEach = function(obj, func) {
2325
for (var p in obj) {

dist/hidpi-canvas.min.js

Lines changed: 3 additions & 3 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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "hidpi-canvas",
33
"description": "A JavaScript drop-in module to polyfill consistent and automatic HiDPI Canvas support.",
4-
"version": "1.0.9",
5-
"license": "Apache 2.0",
4+
"version": "1.0.10",
5+
"license": "Apache-2.0",
66
"homepage": "https://github.com/jondavidjohn/hidpi-canvas-polyfill",
77
"bugs": "https://github.com/jondavidjohn/hidpi-canvas-polyfill/issues",
88
"repository": {
@@ -23,6 +23,8 @@
2323
},
2424
"scripts": {
2525
"test": "grunt",
26-
"prepublish": "grunt dist"
26+
"watch": "grunt watch",
27+
"build": "grunt dist",
28+
"prepublish": "npm run build"
2729
}
2830
}

0 commit comments

Comments
 (0)