From 11a63b51373f750c4bac1fcd1e735cc7f5f1bb71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Wed, 9 Nov 2016 15:28:02 +0100 Subject: [PATCH] Rework the Installation section No longer recommend es6-promise due to its size and the fact it doesn't conform to Promises/A+. Fixes #415 --- README.md | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 0c24681..d5c220d 100644 --- a/README.md +++ b/README.md @@ -9,37 +9,25 @@ possible to the standard Fetch specification at https://fetch.spec.whatwg.org. ## Installation -Available on [Bower](http://bower.io) as **fetch**. +* `npm install whatwg-fetch --save`; or -```sh -$ bower install fetch -``` - -You'll also need a Promise polyfill for [older browsers](http://caniuse.com/#feat=promises). - -```sh -$ bower install es6-promise -``` - -This can also be installed with `npm`. - -```sh -$ npm install whatwg-fetch --save -``` +* `bower install fetch`. -For a node.js implementation, try [node-fetch](https://github.com/bitinn/node-fetch). +You will also need a Promise polyfill for [older browsers](http://caniuse.com/#feat=promises). +We recommend [taylorhakes/promise-polyfill](https://github.com/taylorhakes/promise-polyfill) +for its small size and Promises/A+ compatibility. -For use with webpack, add this package in the `entry` configuration option before your application entry point: +For use with webpack, add this package in the `entry` configuration option +before your application entry point: ```javascript entry: ['whatwg-fetch', ...] ``` -For babel and es2015+, make sure to import the file: +For Babel and ES2015+, make sure to import the file: ```javascript -import 'whatwg-fetch'; -fetch(...); +import 'whatwg-fetch' ``` ## Usage -- GitLab