-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to use in Browserify… #29
Conversation
… library to one with a CommoJS API more similar to Fetch.
@@ -15,7 +15,7 @@ $ bower install fetch | |||
You'll also need a Promise polyfill for older browsers. | |||
|
|||
```sh | |||
$ bower install es6-promise | |||
$ bower install native-promise-only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like native-promise-only
was packaged for npm, not bower.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crumbs, i'll put it back
### Using with npm and Browserify | ||
|
||
```js | ||
require('es6-promise').polyfill(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so native-promise-only
doesn't require an explicit export when used in CJS mode.
I'd be cool recommending either. I guess thats the nice thing about it being optional is that you can use whatever promise polyfill you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, es6-shim
is the same and appears to have bower support?
[I am completely subscribed to this point of view: https://github.com/matthew-andrews/denodeify]
Is this OK to merge or would you like to make any changes? |
It looks good to me @matthew-andrews. I was waiting for @dgraham to review and merge. |
Document how to use in Browserify…
Thanks for writing this up! |
… as per #21. This is just a quick first pass, I'm almost certainly using too many words here.
native-promise-only
as I believe its API is more similar to the CommonJS API fetch has*. Would you like me to change that back?* The equivalent for
es6-promise
is:It would be nice if we can do #9 because it would simplify some of this explanation (around fuzzy versions/version ranges) greatly.