提交 e49237ce 编写于 作者: M mzabriskie

Removing es6-promise dependency

上级 ffc0237a
......@@ -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',
......
......@@ -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",
......
require('es6-promise').polyfill();
var axios = require('../../index');
describe('promise', function () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册