Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
Chameleon
提交
73121145
C
Chameleon
项目概览
DiDi
/
Chameleon
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Chameleon
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
73121145
编写于
8月 21, 2019
作者:
J
JiM-W
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复extra配置不生效bug
上级
4f7204b9
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
4 addition
and
3 deletion
+4
-3
packages/chameleon-tool/commanders/utils.js
packages/chameleon-tool/commanders/utils.js
+4
-3
未找到文件。
packages/chameleon-tool/commanders/utils.js
浏览文件 @
73121145
...
...
@@ -10,6 +10,7 @@ const path = require('path');
const
fs
=
require
(
'
fs
'
);
const
crypto
=
require
(
'
crypto
'
);
const
cmlUtils
=
require
(
'
chameleon-tool-utils
'
);
/**
* 非web端构建
* @param {*} media dev or build ...
...
...
@@ -212,13 +213,13 @@ exports.createConfigJson = function() {
let
configObj
=
{};
if
(
cml
.
utils
.
isFile
(
configJsonPath
))
{
configObj
=
JSON
.
parse
(
fs
.
readFileSync
(
configJsonPath
,
{
encoding
:
'
utf-8
'
}))
}
;
}
// 获取weex jsbundle地址
let
weexjs
=
configObj
.
weexjs
||
''
;
let
md5str
=
''
;
const
weexjsName
=
weexjs
.
split
(
'
/
'
).
pop
();
const
weexjsPath
=
path
.
resolve
(
cml
.
projectRoot
,
'
dist/weex/
'
,
weexjsName
);
if
(
cml
.
utils
.
isFile
(
weexjsPath
))
{
const
md5sum
=
crypto
.
createHash
(
'
md5
'
);
const
buffer
=
fs
.
readFileSync
(
weexjsPath
);
...
...
@@ -327,7 +328,7 @@ exports.createConfigJson = function() {
result
.
forEach
(
item
=>
{
Object
.
keys
(
item
).
forEach
(
key
=>
{
if
(
!~
cml
.
activePlatform
.
indexOf
(
key
))
{
if
(
!~
cml
.
activePlatform
.
indexOf
(
key
)
&&
key
!==
'
extra
'
)
{
delete
item
[
key
]
}
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录