Skip to content

Commit

Permalink
Removing es6-promise dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
mzabriskie committed Aug 11, 2015
1 parent ffc0237 commit e49237c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
10 changes: 0 additions & 10 deletions lib/axios.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions test/specs/promise.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require('es6-promise').polyfill();
var axios = require('../../index');

describe('promise', function () {
Expand Down

0 comments on commit e49237c

Please sign in to comment.