From e49237ce01cda1a36cd71d0bed636a2dc344dcb9 Mon Sep 17 00:00:00 2001 From: mzabriskie Date: Thu, 18 Jun 2015 22:49:36 -0600 Subject: [PATCH] Removing es6-promise dependency --- lib/axios.js | 10 ---------- package.json | 4 +--- test/specs/promise.spec.js | 1 + 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/lib/axios.js b/lib/axios.js index 6a6a551edc..57b770e26c 100644 --- a/lib/axios.js +++ b/lib/axios.js @@ -5,16 +5,6 @@ var utils = require('./utils'); var dispatchRequest = require('./core/dispatchRequest'); var InterceptorManager = require('./core/InterceptorManager'); -// Polyfill ES6 Promise if needed -(function () { - // webpack is being used to set es6-promise to the native Promise - // for the standalone build. It's necessary to make sure polyfill exists. - var P = require('es6-promise'); - if (P && typeof P.polyfill === 'function') { - P.polyfill(); - } -})(); - var axios = module.exports = function axios(config) { config = utils.merge({ method: 'get', diff --git a/package.json b/package.json index 68a64e0591..882da03891 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,9 @@ "url": "https://github.com/mzabriskie/axios/issues" }, "homepage": "https://github.com/mzabriskie/axios", - "dependencies": { - "es6-promise": "^2.3.0" - }, "devDependencies": { "coveralls": "^2.11.2", + "es6-promise": "^2.3.0", "grunt": "^0.4.5", "grunt-banner": "^0.4.0", "grunt-contrib-clean": "^0.6.0", diff --git a/test/specs/promise.spec.js b/test/specs/promise.spec.js index 36b9c64fa7..5dd50886d0 100644 --- a/test/specs/promise.spec.js +++ b/test/specs/promise.spec.js @@ -1,3 +1,4 @@ +require('es6-promise').polyfill(); var axios = require('../../index'); describe('promise', function () {