Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xjbieke
axios
提交
4d2f9c21
A
axios
项目概览
xjbieke
/
axios
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
axios
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4d2f9c21
编写于
3月 09, 2016
作者:
M
Matt Zabriskie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Gettings tests passing for IE9
上级
dcbb3522
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
19 addition
and
5 deletion
+19
-5
karma.conf.js
karma.conf.js
+8
-1
lib/adapters/xhr.js
lib/adapters/xhr.js
+2
-1
package.json
package.json
+1
-1
webpack.config.js
webpack.config.js
+8
-2
未找到文件。
karma.conf.js
浏览文件 @
4d2f9c21
// Karma configuration
// Karma configuration
// Generated on Fri Aug 15 2014 23:11:13 GMT-0500 (CDT)
// Generated on Fri Aug 15 2014 23:11:13 GMT-0500 (CDT)
var
webpack
=
require
(
'
webpack
'
);
function
createCustomLauncher
(
browser
,
version
,
platform
)
{
function
createCustomLauncher
(
browser
,
version
,
platform
)
{
return
{
return
{
base
:
'
SauceLabs
'
,
base
:
'
SauceLabs
'
,
...
@@ -70,7 +72,7 @@ module.exports = function(config) {
...
@@ -70,7 +72,7 @@ module.exports = function(config) {
if
(
runAll
||
process
.
env
.
SAUCE_IE
)
{
if
(
runAll
||
process
.
env
.
SAUCE_IE
)
{
// TODO These need to be fixed
// TODO These need to be fixed
// customLaunchers.SL_IE8 = createCustomLauncher('internet explorer', 8, 'Windows 7');
// customLaunchers.SL_IE8 = createCustomLauncher('internet explorer', 8, 'Windows 7');
//
customLaunchers.SL_IE9 = createCustomLauncher('internet explorer', 9, 'Windows 2008');
customLaunchers
.
SL_IE9
=
createCustomLauncher
(
'
internet explorer
'
,
9
,
'
Windows 2008
'
);
customLaunchers
.
SL_IE10
=
createCustomLauncher
(
'
internet explorer
'
,
10
,
'
Windows 2012
'
);
customLaunchers
.
SL_IE10
=
createCustomLauncher
(
'
internet explorer
'
,
10
,
'
Windows 2012
'
);
customLaunchers
.
SL_IE11
=
createCustomLauncher
(
'
internet explorer
'
,
11
,
'
Windows 8.1
'
);
customLaunchers
.
SL_IE11
=
createCustomLauncher
(
'
internet explorer
'
,
11
,
'
Windows 8.1
'
);
}
}
...
@@ -183,6 +185,11 @@ module.exports = function(config) {
...
@@ -183,6 +185,11 @@ module.exports = function(config) {
{
{
'
./adapters/http
'
:
'
var undefined
'
'
./adapters/http
'
:
'
var undefined
'
}
}
],
plugins
:
[
new
webpack
.
DefinePlugin
({
'
process.env.NODE_ENV
'
:
JSON
.
stringify
(
'
test
'
)
})
]
]
},
},
...
...
lib/adapters/xhr.js
浏览文件 @
4d2f9c21
...
@@ -21,7 +21,8 @@ module.exports = function xhrAdapter(resolve, reject, config) {
...
@@ -21,7 +21,8 @@ module.exports = function xhrAdapter(resolve, reject, config) {
// For IE 8/9 CORS support
// For IE 8/9 CORS support
// Only supports POST and GET calls and doesn't returns the response headers.
// Only supports POST and GET calls and doesn't returns the response headers.
if
(
window
.
XDomainRequest
&&
!
(
'
withCredentials
'
in
request
)
&&
!
isURLSameOrigin
(
config
.
url
))
{
// DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
if
(
process
.
env
.
NODE_ENV
!==
'
test
'
&&
window
.
XDomainRequest
&&
!
(
'
withCredentials
'
in
request
)
&&
!
isURLSameOrigin
(
config
.
url
))
{
request
=
new
window
.
XDomainRequest
();
request
=
new
window
.
XDomainRequest
();
loadEvent
=
'
onload
'
;
loadEvent
=
'
onload
'
;
xDomain
=
true
;
xDomain
=
true
;
...
...
package.json
浏览文件 @
4d2f9c21
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
"description"
:
"Promise based HTTP client for the browser and node.js"
,
"description"
:
"Promise based HTTP client for the browser and node.js"
,
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"scripts"
:
{
"scripts"
:
{
"build"
:
"./node_modules/.bin/grunt build"
,
"build"
:
"
NODE_ENV=production
./node_modules/.bin/grunt build"
,
"test"
:
"./node_modules/.bin/grunt test"
,
"test"
:
"./node_modules/.bin/grunt test"
,
"start"
:
"node ./sandbox/server.js"
,
"start"
:
"node ./sandbox/server.js"
,
"examples"
:
"node ./examples/server.js"
,
"examples"
:
"node ./examples/server.js"
,
...
...
webpack.config.js
浏览文件 @
4d2f9c21
...
@@ -22,15 +22,21 @@ function generateConfig(name) {
...
@@ -22,15 +22,21 @@ function generateConfig(name) {
],
],
devtool
:
'
source-map
'
devtool
:
'
source-map
'
};
};
config
.
plugins
=
[
new
webpack
.
DefinePlugin
({
'
process.env.NODE_ENV
'
:
JSON
.
stringify
(
process
.
env
.
NODE_ENV
)
})
];
if
(
uglify
)
{
if
(
uglify
)
{
config
.
plugins
=
[
config
.
plugins
.
push
(
new
webpack
.
optimize
.
UglifyJsPlugin
({
new
webpack
.
optimize
.
UglifyJsPlugin
({
compressor
:
{
compressor
:
{
warnings
:
false
warnings
:
false
}
}
})
})
]
;
)
;
}
}
return
config
;
return
config
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录