Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yangkaifeng
uni-app
提交
8f162c13
U
uni-app
项目概览
yangkaifeng
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8f162c13
编写于
10月 20, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(uts): compiler
上级
7a1b891d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
20 addition
and
11 deletion
+20
-11
packages/uni-cli-shared/src/resolve.ts
packages/uni-cli-shared/src/resolve.ts
+17
-7
packages/uni-cloud/lib/uni.plugin.js
packages/uni-cloud/lib/uni.plugin.js
+1
-2
packages/uni-uts-v1/src/kotlin.ts
packages/uni-uts-v1/src/kotlin.ts
+1
-1
packages/uni-uts-v1/src/swift.ts
packages/uni-uts-v1/src/swift.ts
+1
-1
未找到文件。
packages/uni-cli-shared/src/resolve.ts
浏览文件 @
8f162c13
...
@@ -201,13 +201,23 @@ function resolveUtsFile(
...
@@ -201,13 +201,23 @@ function resolveUtsFile(
}
}
export
function
resolveUTSCompiler
():
typeof
UTSCompiler
{
export
function
resolveUTSCompiler
():
typeof
UTSCompiler
{
let
compilerPath
:
string
=
''
if
(
isInHBuilderX
())
{
if
(
isInHBuilderX
())
{
return
require
(
path
.
resolve
(
try
{
process
.
env
.
UNI_HBUILDERX_PLUGINS
,
compilerPath
=
require
.
resolve
(
'
uniapp-uts
'
path
.
resolve
(
process
.
env
.
UNI_HBUILDERX_PLUGINS
,
'
uniapp-uts
'
)
))
)
}
catch
(
e
)
{}
}
if
(
!
compilerPath
)
{
try
{
compilerPath
=
require
.
resolve
(
'
@dcloudio/uni-uts-v1
'
,
{
paths
:
[
process
.
env
.
UNI_CLI_CONTEXT
],
})
}
catch
(
e
)
{}
}
if
(
!
compilerPath
)
{
throw
'
uts compiler is not found
'
}
}
return
require
(
require
.
resolve
(
'
@dcloudio/uni-uts-v1
'
,
{
return
require
(
compilerPath
)
paths
:
[
process
.
env
.
UNI_CLI_CONTEXT
],
}))
}
}
packages/uni-cloud/lib/uni.plugin.js
浏览文件 @
8f162c13
...
@@ -150,8 +150,7 @@ exports.default = () => [
...
@@ -150,8 +150,7 @@ exports.default = () => [
const
isSecureNetworkEnabled
=
(
0
,
uni_cli_shared_1
.
isEnableSecureNetwork
)(
inputDir
,
platform
);
const
isSecureNetworkEnabled
=
(
0
,
uni_cli_shared_1
.
isEnableSecureNetwork
)(
inputDir
,
platform
);
return
{
return
{
define
:
{
define
:
{
'
process.env.UNI_SECURE_NETWORK_ENABLE
'
:
isSecureNetworkEnabled
,
'
process.env.UNI_SECURE_NETWORK
'
:
isSecureNetworkEnabled
,
'
process.env.UNI_SECURE_NETWORK_CONFIG
'
:
process
.
env
.
UNI_SECURE_NETWORK_CONFIG
,
},
},
};
};
},
},
...
...
packages/uni-uts-v1/src/kotlin.ts
浏览文件 @
8f162c13
...
@@ -152,7 +152,7 @@ function resolveSourceMapFile(outputDir: string, kotlinFile: string) {
...
@@ -152,7 +152,7 @@ function resolveSourceMapFile(outputDir: string, kotlinFile: string) {
async
function
compile
(
filename
:
string
)
{
async
function
compile
(
filename
:
string
)
{
if
(
!
process
.
env
.
UNI_HBUILDERX_PLUGINS
)
{
if
(
!
process
.
env
.
UNI_HBUILDERX_PLUGINS
)
{
return
console
.
error
(
'
process.env.UNI_HBUILDERX_PLUGINS is not found
'
)
throw
'
process.env.UNI_HBUILDERX_PLUGINS is not found
'
}
}
const
{
bundle
,
UtsTarget
}
=
getUtsCompiler
()
const
{
bundle
,
UtsTarget
}
=
getUtsCompiler
()
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
...
...
packages/uni-uts-v1/src/swift.ts
浏览文件 @
8f162c13
...
@@ -40,7 +40,7 @@ export async function runSwiftDev(_filename: string) {}
...
@@ -40,7 +40,7 @@ export async function runSwiftDev(_filename: string) {}
async
function
compile
(
filename
:
string
)
{
async
function
compile
(
filename
:
string
)
{
if
(
!
process
.
env
.
UNI_HBUILDERX_PLUGINS
)
{
if
(
!
process
.
env
.
UNI_HBUILDERX_PLUGINS
)
{
return
console
.
error
(
'
process.env.UNI_HBUILDERX_PLUGINS is not found
'
)
throw
'
process.env.UNI_HBUILDERX_PLUGINS is not found
'
}
}
const
{
bundle
,
UtsTarget
}
=
getUtsCompiler
()
const
{
bundle
,
UtsTarget
}
=
getUtsCompiler
()
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录