Skip to content
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

Merged
merged 7 commits into from
Oct 31, 2014

Conversation

matthew-andrews
Copy link
Contributor

… as per #21. This is just a quick first pass, I'm almost certainly using too many words here.

  • I've proposed changing the suggest ES6 Promise implementation to 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?
  • Would you like me to squash my commits?
  • Is ‘fuzzy versions’ clear enough or should I change this to ‘version ranges’?

* The equivalent for es6-promise is:

require('es6-promise').polyfill(); // require('native-promise-only');

It would be nice if we can do #9 because it would simplify some of this explanation (around fuzzy versions/version ranges) greatly.

@@ -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
Copy link
Contributor

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.

Copy link
Contributor Author

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();
Copy link
Contributor

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.

Copy link
Contributor Author

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]

@matthew-andrews
Copy link
Contributor Author

Is this OK to merge or would you like to make any changes?

@josh
Copy link
Contributor

josh commented Oct 31, 2014

It looks good to me @matthew-andrews.

I was waiting for @dgraham to review and merge.

dgraham added a commit that referenced this pull request Oct 31, 2014
Document how to use in Browserify…
@dgraham dgraham merged commit fc28061 into JakeChampion:master Oct 31, 2014
@dgraham
Copy link
Contributor

dgraham commented Oct 31, 2014

Thanks for writing this up!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants