Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qianlong66
uni-app
提交
d4ae7bf5
U
uni-app
项目概览
qianlong66
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d4ae7bf5
编写于
9月 14, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wip(uts): compiler
上级
a51e70f5
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
11 addition
and
8 deletion
+11
-8
packages/playground/uts/uni_modules/test-uniplugin/app-ios/index.uts
...ayground/uts/uni_modules/test-uniplugin/app-ios/index.uts
+2
-0
packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift
...e/dist/app/uni_modules/test-uniplugin/app-ios/index.swift
+2
-0
packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift.map
...st/app/uni_modules/test-uniplugin/app-ios/index.swift.map
+1
-1
packages/uni-uts-vite/src/utils/compiler/kotlin.ts
packages/uni-uts-vite/src/utils/compiler/kotlin.ts
+1
-2
packages/uni-uts-vite/src/utils/compiler/swift.ts
packages/uni-uts-vite/src/utils/compiler/swift.ts
+1
-2
packages/uts-darwin-arm64/uts.darwin-arm64.node
packages/uts-darwin-arm64/uts.darwin-arm64.node
+0
-0
packages/uts-darwin-x64/uts.darwin-x64.node
packages/uts-darwin-x64/uts.darwin-x64.node
+0
-0
packages/uts/src/types.ts
packages/uts/src/types.ts
+2
-3
scripts/test.js
scripts/test.js
+2
-0
未找到文件。
packages/playground/uts/uni_modules/test-uniplugin/app-ios/index.uts
浏览文件 @
d4ae7bf5
...
...
@@ -19,3 +19,5 @@ export default async function getBatteryInfo(options: GetBatteryInfoOptions) {
options
.
complete
!
(
res
)
}
}
export
class
Test
{}
packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift
浏览文件 @
d4ae7bf5
...
...
@@ -13,3 +13,5 @@ async func getBatteryInfo(_ options: GetBatteryInfoOptions) {
if
(
options
.
success
!=
nil
)
options
.
success
!
(
res
);
if
(
options
.
complete
!=
nil
)
options
.
complete
!
(
res
);
}
class
Test
:
NSObject
{
}
packages/playground/uts/unpackage/dist/app/uni_modules/test-uniplugin/app-ios/index.swift.map
浏览文件 @
d4ae7bf5
{
"version"
:
3
,
"sources"
:
[
"/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-ios/index.uts"
],
"sourcesContent"
:
[
"import { UIDevice } from 'UIKit'
\n\n
type GetBatteryInfoOptions = {\n success?: (res: UTSJSONObject) => void
\n
fail?: (res: UTSJSONObject) => void
\n
complete?: (res: UTSJSONObject) => void
\n
}
\n\n
export default async function getBatteryInfo(options: GetBatteryInfoOptions) {\n const res = {\n errMsg: 'getBatteryInfo:ok',
\n
level: UIDevice.current.batteryLevel * 100,
\n
isCharging: UIDevice.current.batteryState == UIDevice.BatteryState.charging,
\n
}
\n
if (options.success != null) {\n options.success!(res)
\n
}
\n
if (options.complete != null) {\n options.complete!(res)
\n
}
\n
}
\n
"
],
"names"
:
[],
"mappings"
:
"AAAA;UAEK,qBAAqB;QACxB,OAAO,MAAI,GAAkB,EAAb,aAAa,KAAK,IAAI;QACtC,IAAI,MAAI,GAAkB,EAAb,aAAa,KAAK,IAAI;QACnC,QAAQ,MAAI,GAAkB,EAAb,aAAa,KAAK,IAAI;;AAG1B,WAAe,cAAc,CAAC,EAAA,OAA8B,EAArB,qBAAqB,EAAE;IAC3E,IAAM,GAAG,GAAG;QACV,CAAA,MAAM,GAAE,mBAAmB;QAC3B,CAAA,KAAK,GAAE,QAAQ,CAAC,OAAO,CAAC,YAAY,GAAG,GAAG;QAC1C,CAAA,UAAU,GAAE,QAAQ,CAAC,OAAO,CAAC,YAAY,IAAI,QAAQ,CAAC,YAAY,CAAC,QAAQ;KAC5E;IACD,IAAI,OAAO,CAAC,OAAO,IAAI,GAAI,EACzB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;IAEvB,IAAI,OAAO,CAAC,QAAQ,IAAI,GAAI,EAC1B,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;AAE1B"
}
\ No newline at end of file
{
"version"
:
3
,
"sources"
:
[
"/Users/fxy/Projects/GitHub/uni-app/uni-app-next/packages/playground/uts/uni_modules/test-uniplugin/app-ios/index.uts"
],
"sourcesContent"
:
[
"import { UIDevice } from 'UIKit'
\n\n
type GetBatteryInfoOptions = {\n success?: (res: UTSJSONObject) => void
\n
fail?: (res: UTSJSONObject) => void
\n
complete?: (res: UTSJSONObject) => void
\n
}
\n\n
export default async function getBatteryInfo(options: GetBatteryInfoOptions) {\n const res = {\n errMsg: 'getBatteryInfo:ok',
\n
level: UIDevice.current.batteryLevel * 100,
\n
isCharging: UIDevice.current.batteryState == UIDevice.BatteryState.charging,
\n
}
\n
if (options.success != null) {\n options.success!(res)
\n
}
\n
if (options.complete != null) {\n options.complete!(res)
\n
}
\n
}
\n\n
export class Test
{
}\n"],"names":[],"mappings":"AAAA;UAEK,qBAAqB;QACxB,OAAO,MAAI,GAAkB,EAAb,aAAa,KAAK,IAAI;QACtC,IAAI,MAAI,GAAkB,EAAb,aAAa,KAAK,IAAI;QACnC,QAAQ,MAAI,GAAkB,EAAb,aAAa,KAAK,IAAI;;AAG1B,WAAe,cAAc,CAAC,EAAA,OAA8B,EAArB,qBAAqB,EAAE;IAC3E,IAAM,GAAG,GAAG;QACV,CAAA,MAAM,GAAE,mBAAmB;QAC3B,CAAA,KAAK,GAAE,QAAQ,CAAC,OAAO,CAAC,YAAY,GAAG,GAAG;QAC1C,CAAA,UAAU,GAAE,QAAQ,CAAC,OAAO,CAAC,YAAY,IAAI,QAAQ,CAAC,YAAY,CAAC,QAAQ;KAC5E;IACD,IAAI,OAAO,CAAC,OAAO,IAAI,GAAI,EACzB,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC;IAEvB,IAAI,OAAO,CAAC,QAAQ,IAAI,GAAI,EAC1B,OAAO,CAAC,QAAQ,EAAE,GAAG,CAAC;AAE1B;AAEO,MAAM,IAAI;CAAG"
}
\ No newline at end of file
packages/uni-uts-vite/src/utils/compiler/kotlin.ts
浏览文件 @
d4ae7bf5
...
...
@@ -35,8 +35,7 @@ export async function compileKotlin(filename: string) {
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
const
outputDir
=
process
.
env
.
UNI_OUTPUT_DIR
// let time = Date.now()
await
bundle
({
target
:
UtsTarget
.
KOTLIN
,
await
bundle
(
UtsTarget
.
KOTLIN
,
{
input
:
{
root
:
inputDir
,
filename
,
...
...
packages/uni-uts-vite/src/utils/compiler/swift.ts
浏览文件 @
d4ae7bf5
...
...
@@ -22,8 +22,7 @@ export async function compileSwift(filename: string) {
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
const
outputDir
=
process
.
env
.
UNI_OUTPUT_DIR
// let time = Date.now()
await
bundle
({
target
:
UtsTarget
.
SWIFT
,
await
bundle
(
UtsTarget
.
SWIFT
,
{
input
:
{
root
:
inputDir
,
filename
,
...
...
packages/uts-darwin-arm64/uts.darwin-arm64.node
浏览文件 @
d4ae7bf5
无法预览此类型文件
packages/uts-darwin-x64/uts.darwin-x64.node
浏览文件 @
d4ae7bf5
无法预览此类型文件
packages/uts/src/types.ts
浏览文件 @
d4ae7bf5
...
...
@@ -29,6 +29,7 @@ export type UtsOutputOptions = {
extname
:
string
logFilename
?:
boolean
noColor
?:
boolean
isPlugin
?:
boolean
}
export
interface
UtsOptions
{
input
:
UtsInputOptions
...
...
@@ -41,6 +42,4 @@ export interface UtsResult {
error
?:
Error
}
export
interface
UtsBundleOptions
extends
UtsOptions
{
target
:
UtsTarget
}
export
interface
UtsBundleOptions
extends
UtsOptions
{}
scripts/test.js
浏览文件 @
d4ae7bf5
...
...
@@ -33,6 +33,7 @@ function testKotlin() {
sourceMap
:
true
,
extname
:
'
kt
'
,
logFilename
:
true
,
isPlugin
:
true
,
},
}).
then
((
res
)
=>
{
console
.
log
(
'
bundle:
'
+
(
Date
.
now
()
-
start
)
+
'
ms
'
)
...
...
@@ -65,6 +66,7 @@ function testSwift() {
sourceMap
:
true
,
extname
:
'
swift
'
,
logFilename
:
true
,
isPlugin
:
true
,
},
}).
then
((
res
)
=>
{
console
.
log
(
'
bundle:
'
+
(
Date
.
now
()
-
start
)
+
'
ms
'
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录