Skip to content

Commit 3712d59

Browse files
committed
Removed polyfill dependency
1 parent d37413d commit 3712d59

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ When it comes to clearing all open notifications, that's just as easy as well:
6666
Push.clear();
6767
```
6868

69+
**Important:** Although Javascript promises are [decently supported](http://caniuse.com/#search=promises) across browsers, there are still some browsers that lack support. If you find that you are trying to support a browser that doesn't support promises, chances are it won't support notifications either. However, if you are really determined, I encourage you to checkout the lightweight [promise-polyfill](https://github.com/taylorhakes/promise-polyfill) library by Taylor Hakes (or something similar). This library used to be bundled with Push, until it was decided that it'd be better to leave that sort of dependency to the user's discretion.
70+
6971
### Options ###
7072

7173
The only required argument in a Push call is a title. However, that doesn't mean you can't add a little something extra. You can pass in options to Push as well, like so:

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"name": "push.js",
33
"version": "0.0.8",
44
"description": "A compact, cross-browser solution for the Javascript Notifications API",
5-
"main": "push.min.js",
5+
"main": "push.js",
66
"scripts": {
7-
"build": "node_modules/.bin/uglifyjs push.js node_modules/promise-polyfill/promise.js -o push.min.js --comments",
7+
"build": "node_modules/.bin/uglifyjs push.js -o push.min.js --comments",
88
"test": "node_modules/.bin/karma start",
99
"prepublish": "npm run build"
1010
},
@@ -32,8 +32,5 @@
3232
"karma-jasmine": "^0.3.8",
3333
"karma-mocha-reporter": "^1.3.0",
3434
"uglify-js": "^2.6.2"
35-
},
36-
"dependencies": {
37-
"promise-polyfill": "^5.2.1"
3835
}
3936
}

push.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.

0 commit comments

Comments
 (0)