Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
6815e67f
U
uni-app
项目概览
DCloud
/
uni-app
3 个月 前同步成功
通知
720
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6815e67f
编写于
11月 04, 2021
作者:
Q
qiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: lint
上级
8f8aa2af
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
11 deletion
+19
-11
packages/uni-cli-shared/lib/util.js
packages/uni-cli-shared/lib/util.js
+2
-1
packages/uni-template-compiler/__tests__/compiler-app-plus.service.spec.js
...late-compiler/__tests__/compiler-app-plus.service.spec.js
+1
-1
packages/vue-cli-plugin-uni/lib/check-update.js
packages/vue-cli-plugin-uni/lib/check-update.js
+16
-9
未找到文件。
packages/uni-cli-shared/lib/util.js
浏览文件 @
6815e67f
const
path
=
require
(
'
path
'
)
const
fs
=
require
(
'
fs
'
)
const
hash
=
require
(
'
hash-sum
'
)
const
crypto
=
require
(
'
crypto
'
)
...
...
@@ -20,7 +21,7 @@ function getCLIContext () {
if
(
isInHBuilderX
)
{
return
context
}
const
pnpmFind
=
__dirname
.
match
(
/.+
?[
\/\\]
.pnpm
[\
/\\]
/
)
const
pnpmFind
=
__dirname
.
match
(
/.+
?[
/\\]
.pnpm
[
/\\]
/
)
if
(
pnpmFind
)
{
const
pnpm
=
pnpmFind
[
0
]
context
=
path
.
resolve
(
pnpm
,
'
../../
'
)
...
...
packages/uni-template-compiler/__tests__/compiler-app-plus.service.spec.js
浏览文件 @
6815e67f
...
...
@@ -193,7 +193,7 @@ describe('codegen', () => {
`with(this){return _c('p',{slot:"one"})}`
)
})
it
(
'
generate slot with v-for
'
,
()
=>
{
assertCodegen
(
'
<div><slot v-for="item in list"></slot></div>
'
,
...
...
packages/vue-cli-plugin-uni/lib/check-update.js
浏览文件 @
6815e67f
...
...
@@ -21,6 +21,7 @@ class Upate {
get
uniId
()
{
return
this
.
_uniId
}
set
uniId
(
value
)
{
this
.
_uniId
=
value
}
...
...
@@ -28,6 +29,7 @@ class Upate {
get
appId
()
{
return
this
.
_appId
}
set
appId
(
value
)
{
this
.
_appId
=
value
}
...
...
@@ -35,6 +37,7 @@ class Upate {
get
compilerVersion
()
{
return
this
.
_compilerVersion
}
set
compilerVersion
(
value
)
{
this
.
_compilerVersion
=
value
}
...
...
@@ -42,6 +45,7 @@ class Upate {
get
isAlpha
()
{
return
this
.
_isAlpha
}
set
isAlpha
(
value
)
{
this
.
_isAlpha
=
value
}
...
...
@@ -49,6 +53,7 @@ class Upate {
get
wt
()
{
return
this
.
_wt
}
set
wt
(
value
)
{
this
.
_wt
=
value
}
...
...
@@ -56,6 +61,7 @@ class Upate {
get
lc
()
{
return
this
.
_lc
}
set
lc
(
value
)
{
this
.
_lc
=
value
}
...
...
@@ -63,6 +69,7 @@ class Upate {
get
lcin
()
{
return
this
.
_lcin
}
set
lcin
(
value
)
{
this
.
_lcin
=
value
}
...
...
@@ -257,17 +264,17 @@ Object.assign(Upate.prototype, {
DEFAULT_INTERVAL
:
1000
*
60
*
60
*
24
})
function
getLc
()
{
le
t
result
=
[]
const
locale
_d
ir
=
path
.
join
(
process
.
env
.
UNI_CLI_CONTEXT
,
'
src/locale
'
)
if
(
!
fs
.
existsSync
(
locale
_d
ir
))
{
function
getLc
()
{
cons
t
result
=
[]
const
locale
D
ir
=
path
.
join
(
process
.
env
.
UNI_CLI_CONTEXT
,
'
src/locale
'
)
if
(
!
fs
.
existsSync
(
locale
D
ir
))
{
return
result
}
let
files
=
fs
.
readdirSync
(
locale_d
ir
)
const
files
=
fs
.
readdirSync
(
localeD
ir
)
for
(
let
i
=
files
.
length
-
1
;
i
>=
0
;
i
--
)
{
le
t
filePath
=
files
[
i
]
le
t
extName
=
filePath
.
substring
(
filePath
.
lastIndexOf
(
'
.
'
)
+
1
).
toLowerCase
()
cons
t
filePath
=
files
[
i
]
cons
t
extName
=
filePath
.
substring
(
filePath
.
lastIndexOf
(
'
.
'
)
+
1
).
toLowerCase
()
if
(
extName
!==
'
json
'
)
{
continue
}
...
...
@@ -300,9 +307,9 @@ module.exports = async function checkUpdate () {
update
.
uniId
=
manifest
.
appid
const
appIdKey
=
process
.
env
.
UNI_PLATFORM
.
includes
(
'
quickapp
'
)
?
'
package
'
:
'
appid
'
update
.
appId
=
manifest
[
process
.
env
.
UNI_PLATFORM
]
?
(
manifest
[
process
.
env
.
UNI_PLATFORM
][
appIdKey
]
||
''
)
:
''
const
cf
=
manifest
[
'
mp-weixin
'
]
?
manifest
[
'
mp-weixin
'
]
[
'
cloudfunctionRoot
'
]
:
''
const
cf
=
manifest
[
'
mp-weixin
'
]
?
manifest
[
'
mp-weixin
'
]
.
cloudfunctionRoot
:
''
update
.
wt
=
(
cf
&&
cf
.
length
)
?
1
:
0
update
.
lc
=
manifest
[
'
locale
'
]
?
manifest
[
'
locale
'
]
:
''
update
.
lc
=
manifest
.
locale
?
manifest
.
locale
:
''
update
.
lcin
=
getLc
().
join
(
'
,
'
)
update
.
check
()
}
catch
(
e
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录