Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
genary
uni-app
提交
c7e263d9
U
uni-app
项目概览
genary
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
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,发现更多精彩内容 >>
提交
c7e263d9
编写于
10月 12, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: remove warnings when minifying css
上级
ecb5f8ee
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
62 addition
and
6 deletion
+62
-6
packages/uni-cli-shared/src/hbx/log.ts
packages/uni-cli-shared/src/hbx/log.ts
+9
-0
packages/uni-cli-shared/src/index.ts
packages/uni-cli-shared/src/index.ts
+1
-0
packages/uni-cli-shared/src/logs/format.ts
packages/uni-cli-shared/src/logs/format.ts
+19
-1
packages/uni-cli-shared/src/logs/index.ts
packages/uni-cli-shared/src/logs/index.ts
+1
-1
packages/uni-cli-shared/src/mp/event.ts
packages/uni-cli-shared/src/mp/event.ts
+20
-0
packages/uni-cli-shared/src/mp/index.ts
packages/uni-cli-shared/src/mp/index.ts
+1
-0
packages/uni-stat/dist/uni-stat.cjs.js
packages/uni-stat/dist/uni-stat.cjs.js
+1
-1
packages/uni-stat/dist/uni-stat.es.js
packages/uni-stat/dist/uni-stat.es.js
+1
-1
packages/vite-plugin-uni/src/configResolved/index.ts
packages/vite-plugin-uni/src/configResolved/index.ts
+9
-2
未找到文件。
packages/uni-cli-shared/src/hbx/log.ts
浏览文件 @
c7e263d9
...
...
@@ -42,3 +42,12 @@ export const removeInfoFormatter: Formatter = {
return
''
},
}
const
REMOVED_WARN_MSGS
=
[
'
warnings when minifying css:
'
]
export
const
removeWarnFormatter
:
Formatter
=
{
test
(
msg
)
{
return
!!
REMOVED_WARN_MSGS
.
find
((
m
)
=>
msg
.
includes
(
m
))
},
format
()
{
return
''
},
}
packages/uni-cli-shared/src/index.ts
浏览文件 @
c7e263d9
export
*
from
'
./fs
'
export
*
from
'
./mp
'
export
*
from
'
./env
'
export
*
from
'
./hbx
'
export
*
from
'
./logs
'
...
...
packages/uni-cli-shared/src/logs/format.ts
浏览文件 @
c7e263d9
...
...
@@ -2,7 +2,11 @@ import { once } from '@dcloudio/uni-shared'
import
{
isInHBuilderX
}
from
'
../hbx/env
'
import
{
moduleAliasFormatter
}
from
'
../hbx/alias
'
import
{
h5ServeFormatter
,
removeInfoFormatter
}
from
'
../hbx/log
'
import
{
h5ServeFormatter
,
removeInfoFormatter
,
removeWarnFormatter
,
}
from
'
../hbx/log
'
export
interface
Formatter
{
test
:
(
msg
:
string
)
=>
boolean
...
...
@@ -11,6 +15,7 @@ export interface Formatter {
const
errFormatters
:
Formatter
[]
=
[]
const
infoFormatters
:
Formatter
[]
=
[]
const
warnFormatters
:
Formatter
[]
=
[]
const
initErrFormattersOnce
=
once
(()
=>
{
if
(
isInHBuilderX
())
{
...
...
@@ -31,6 +36,10 @@ const initInfoFormattersOnce = once(() => {
infoFormatters
.
push
(
removeInfoFormatter
)
})
const
initWarnFormattersOnce
=
once
(()
=>
{
warnFormatters
.
push
(
removeWarnFormatter
)
})
export
function
formatErrMsg
(
msg
:
string
)
{
initErrFormattersOnce
()
const
formatter
=
errFormatters
.
find
(({
test
})
=>
test
(
msg
))
...
...
@@ -48,3 +57,12 @@ export function formatInfoMsg(msg: string) {
}
return
msg
}
export
function
formatWarnMsg
(
msg
:
string
)
{
initWarnFormattersOnce
()
const
formatter
=
warnFormatters
.
find
(({
test
})
=>
test
(
msg
))
if
(
formatter
)
{
return
formatter
.
format
(
msg
)
}
return
msg
}
packages/uni-cli-shared/src/logs/index.ts
浏览文件 @
c7e263d9
export
{
formatErrMsg
,
formatInfoMsg
}
from
'
./format
'
export
{
formatErrMsg
,
formatInfoMsg
,
formatWarnMsg
}
from
'
./format
'
packages/uni-cli-shared/src/mp/event.ts
0 → 100644
浏览文件 @
c7e263d9
export
function
formatMiniProgramEvent
(
eventName
:
string
,
{
isCatch
,
isCapture
,
}:
{
isCatch
?:
boolean
isCapture
?:
boolean
}
)
{
let
eventType
=
'
bind
'
if
(
isCatch
)
{
eventType
=
'
catch
'
}
if
(
isCapture
)
{
return
`capture-
${
eventType
}
:
${
eventName
}
`
}
// 原生组件不支持 bind:input 等写法,统一使用 bindinput
return
`
${
eventType
}${
eventName
}
`
}
packages/uni-cli-shared/src/mp/index.ts
0 → 100644
浏览文件 @
c7e263d9
export
*
from
'
./event
'
packages/uni-stat/dist/uni-stat.cjs.js
浏览文件 @
c7e263d9
'
use strict
'
;
var
version
=
"
3.0.0-alpha-302102021
0930001
"
;
var
version
=
"
3.0.0-alpha-302102021
1012003
"
;
const
STAT_VERSION
=
version
;
const
STAT_URL
=
'
https://tongji.dcloud.io/uni/stat
'
;
...
...
packages/uni-stat/dist/uni-stat.es.js
浏览文件 @
c7e263d9
var
version
=
"
3.0.0-alpha-302102021
0930001
"
;
var
version
=
"
3.0.0-alpha-302102021
1012003
"
;
const
STAT_VERSION
=
version
;
const
STAT_URL
=
'
https://tongji.dcloud.io/uni/stat
'
;
...
...
packages/vite-plugin-uni/src/configResolved/index.ts
浏览文件 @
c7e263d9
import
{
Plugin
,
ResolvedConfig
}
from
'
vite
'
import
{
formatErrMsg
,
checkUpdate
,
isWindows
,
formatErrMsg
,
formatInfoMsg
,
formatWarnMsg
,
}
from
'
@dcloudio/uni-cli-shared
'
import
{
VitePluginUniResolvedOptions
}
from
'
..
'
...
...
@@ -42,13 +43,19 @@ function initCheckUpdate() {
}
function
initLogger
({
logger
}:
ResolvedConfig
)
{
const
{
info
,
error
}
=
logger
const
{
info
,
warn
,
error
}
=
logger
logger
.
info
=
(
msg
,
opts
)
=>
{
msg
=
formatInfoMsg
(
msg
)
if
(
msg
)
{
return
info
(
msg
,
opts
)
}
}
logger
.
warn
=
(
msg
,
opts
)
=>
{
msg
=
formatWarnMsg
(
msg
)
if
(
msg
)
{
return
warn
(
msg
,
opts
)
}
}
logger
.
error
=
(
msg
,
opts
)
=>
{
msg
=
formatErrMsg
(
msg
)
if
(
msg
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录