Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
third_party_jsframework
提交
cd9c256b
T
third_party_jsframework
项目概览
OpenHarmony
/
third_party_jsframework
8 个月 前同步成功
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
third_party_jsframework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
cd9c256b
编写于
10月 10, 2022
作者:
B
buzhifeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
API8eTS工程的FA模型查看预览器输出日志窗口,日志打印不完全
Signed-off-by:
N
buzhifeng
<
buzhifeng2@huawei.com
>
上级
8202f9aa
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
5 deletion
+13
-5
mock-generate/package.json
mock-generate/package.json
+1
-1
mock-generate/src/generate/generateCommonFunction.ts
mock-generate/src/generate/generateCommonFunction.ts
+5
-1
mock-generate/src/generate/generateCommonMethodSignature.ts
mock-generate/src/generate/generateCommonMethodSignature.ts
+5
-1
package.json
package.json
+2
-2
未找到文件。
mock-generate/package.json
浏览文件 @
cd9c256b
...
...
@@ -4,7 +4,7 @@
"description"
:
"generate mock"
,
"main"
:
"main.js"
,
"scripts"
:
{
"build"
:
"npm install && tsc && cd dist && node main.js && cd .. && eslint -c .eslintrc --fix ../runtime/**/systemplugin/**/*.js"
"build"
:
"npm install &&
node ../node_modules/typescript/bin/
tsc && cd dist && node main.js && cd .. && eslint -c .eslintrc --fix ../runtime/**/systemplugin/**/*.js"
},
"keywords"
:
[
"mock"
...
...
mock-generate/src/generate/generateCommonFunction.ts
浏览文件 @
cd9c256b
...
...
@@ -37,7 +37,11 @@ export function generateCommonFunction(rootName: string, functionArray: Array<Fu
functionBody
+=
getCallbackStatement
();
}
if
(
functionEntity
.
returnType
.
returnKind
!==
SyntaxKind
.
VoidKeyword
)
{
functionBody
+=
getReturnStatement
(
functionEntity
.
returnType
,
sourceFile
);
if
(
rootName
===
'
featureAbility
'
&&
functionEntity
.
returnType
.
returnKindName
===
'
Context
'
)
{
functionBody
+=
'
return _Context;
'
;
}
else
{
functionBody
+=
getReturnStatement
(
functionEntity
.
returnType
,
sourceFile
);
}
}
}
else
{
const
argSet
:
Set
<
string
>
=
new
Set
<
string
>
();
...
...
mock-generate/src/generate/generateCommonMethodSignature.ts
浏览文件 @
cd9c256b
...
...
@@ -36,7 +36,11 @@ export function generateCommonMethodSignature(rootName: string, methodSignatureA
methodSignatureBody
+=
getCallbackStatement
();
}
if
(
methodEntity
.
returnType
.
returnKind
!==
SyntaxKind
.
VoidKeyword
)
{
methodSignatureBody
+=
getReturnStatement
(
methodEntity
.
returnType
,
sourceFile
);
if
(
rootName
===
'
Context
'
&&
methodEntity
.
returnType
.
returnKindName
===
'
Context
'
)
{
methodSignatureBody
+=
'
return Context;
'
;
}
else
{
methodSignatureBody
+=
getReturnStatement
(
methodEntity
.
returnType
,
sourceFile
);
}
}
}
else
{
const
argSet
:
Set
<
string
>
=
new
Set
<
string
>
();
...
...
package.json
浏览文件 @
cd9c256b
...
...
@@ -7,8 +7,8 @@
"scripts"
:
{
"test:lint"
:
"eslint -c .eslintrc --fix test/**/*.ts"
,
"test:unit"
:
"mocha --timeout 5000 -r ts-node/register test/lib.ts test/ut/**/*.ts test/ut/*.ts"
,
"build:mock"
:
"cd ./mock-generate && npm run build
&& cd ..
"
,
"build"
:
"node build_jsmock_system_plugin.js && node build_strip_native_min.js"
"build:mock"
:
"cd ./mock-generate && npm run build"
,
"build"
:
"n
pm run build:mock && n
ode build_jsmock_system_plugin.js && node build_strip_native_min.js"
},
"keywords"
:
[
"javascript"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录