Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
33152153
U
uni-app
项目概览
DCloud
/
uni-app
6 个月 前同步成功
通知
751
Star
38709
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
8
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
8
Issue
8
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
33152153
编写于
11月 11, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update deps
上级
102c64bf
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
158 addition
and
49 deletion
+158
-49
packages/uni-app-vite/package.json
packages/uni-app-vite/package.json
+1
-0
packages/uni-cli-shared/src/hbx/env.ts
packages/uni-cli-shared/src/hbx/env.ts
+4
-1
packages/uni-h5-vite/package.json
packages/uni-h5-vite/package.json
+5
-1
packages/uni-mp-vite/package.json
packages/uni-mp-vite/package.json
+1
-0
packages/uni-stat/build.json
packages/uni-stat/build.json
+15
-4
packages/uni-stat/lib/uni.plugin.js
packages/uni-stat/lib/uni.plugin.js
+27
-21
packages/uni-stat/package.json
packages/uni-stat/package.json
+5
-1
packages/uni-stat/src/plugin/index.ts
packages/uni-stat/src/plugin/index.ts
+70
-0
packages/vite-plugin-uni/package.json
packages/vite-plugin-uni/package.json
+1
-5
pnpm-lock.yaml
pnpm-lock.yaml
+29
-16
未找到文件。
packages/uni-app-vite/package.json
浏览文件 @
33152153
...
...
@@ -25,6 +25,7 @@
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"@rollup/pluginutils"
:
"^4.1.1"
,
"clean-css"
:
"^5.1.3"
,
"debug"
:
"^4.3.2"
,
"fs-extra"
:
"^10.0.0"
,
"postcss-import"
:
"^14.0.2"
,
"postcss-load-config"
:
"^3.1.0"
,
...
...
packages/uni-cli-shared/src/hbx/env.ts
浏览文件 @
33152153
...
...
@@ -8,7 +8,10 @@ export const isInHBuilderX = once(() => {
process
.
cwd
(),
'
../about/package.json
'
))
return
name
===
'
about
'
if
(
name
===
'
about
'
)
{
process
.
env
.
UNI_HBUILDERX_PLUGINS
=
path
.
resolve
(
process
.
cwd
(),
'
..
'
)
return
true
}
}
catch
(
e
)
{
// console.error(e)
}
...
...
packages/uni-h5-vite/package.json
浏览文件 @
33152153
...
...
@@ -24,9 +24,13 @@
"@rollup/pluginutils"
:
"^4.1.1"
,
"@vue/compiler-dom"
:
"3.2.21"
,
"@vue/compiler-sfc"
:
"3.2.21"
,
"@vue/server-renderer"
:
"3.2.21"
"@vue/server-renderer"
:
"3.2.21"
,
"debug"
:
"^4.3.2"
,
"mime"
:
"^3.0.0"
,
"module-alias"
:
"^2.2.2"
},
"devDependencies"
:
{
"@types/mime"
:
"^2.0.3"
,
"@vue/compiler-core"
:
"3.2.21"
,
"esbuild"
:
"^0.13.2"
}
...
...
packages/uni-mp-vite/package.json
浏览文件 @
33152153
...
...
@@ -23,6 +23,7 @@
"@dcloudio/uni-mp-vue"
:
"3.0.0-alpha-3021320211109003"
,
"@dcloudio/uni-shared"
:
"3.0.0-alpha-3021320211109003"
,
"base64url"
:
"^3.0.1"
,
"debug"
:
"^4.3.2"
,
"magic-string"
:
"^0.25.7"
},
"gitHead"
:
"33e807d66e1fe47e2ee08ad9c59247e37b8884da"
,
...
...
packages/uni-stat/build.json
浏览文件 @
33152153
{
"input"
:
{
"src/index.js"
:
[
"dist/uni-stat.es.js"
,
"dist/uni-stat.cjs.js"
]
[
{
"input"
:
{
"src/plugin/index.ts"
:
"lib/uni.plugin.js"
},
"output"
:
{
"format"
:
"cjs"
},
"external"
:
[
"debug"
,
"@dcloudio/uni-cli-shared"
]
},
{
"input"
:
{
"src/index.js"
:
[
"dist/uni-stat.es.js"
,
"dist/uni-stat.cjs.js"
]
}
}
}
]
packages/uni-stat/lib/uni.plugin.js
浏览文件 @
33152153
const
debug
=
require
(
'
debug
'
)
const
{
M
,
defineUniMainJsPlugin
,
getUniStatistics
,
parseManifestJsonOnce
,
parsePagesJsonOnce
,
}
=
require
(
'
@dcloudio/uni-cli-shared
'
)
'
use strict
'
module
.
exports
=
[
defineUniMainJsPlugin
((
opts
)
=>
{
var
debug
=
require
(
'
debug
'
)
var
uniCliShared
=
require
(
'
@dcloudio/uni-cli-shared
'
)
function
_interopDefaultLegacy
(
e
)
{
return
e
&&
typeof
e
===
'
object
'
&&
'
default
'
in
e
?
e
:
{
default
:
e
}
}
var
debug__default
=
/*#__PURE__*/
_interopDefaultLegacy
(
debug
)
var
index
=
[
uniCliShared
.
defineUniMainJsPlugin
((
opts
)
=>
{
let
isEnable
=
false
return
{
name
:
'
vite:uni-stat
'
,
...
...
@@ -19,26 +21,29 @@ module.exports = [
}
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
const
platform
=
process
.
env
.
UNI_PLATFORM
isEnable
=
getUniStatistics
(
inputDir
,
platform
).
enable
===
true
isEnable
=
uniCliShared
.
getUniStatistics
(
inputDir
,
platform
).
enable
===
true
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
const
manifestJson
=
parseManifestJsonOnce
(
inputDir
)
const
manifestJson
=
uniCliShared
.
parseManifestJsonOnce
(
inputDir
)
if
(
!
manifestJson
.
appid
)
{
console
.
log
()
console
.
warn
(
M
[
'
stat.warn.appid
'
])
console
.
warn
(
uniCliShared
.
M
[
'
stat.warn.appid
'
])
console
.
log
()
isEnable
=
false
}
}
const
titlesJson
=
Object
.
create
(
null
)
if
(
isEnable
)
{
parsePagesJsonOnce
(
inputDir
,
platform
).
pages
.
forEach
((
page
)
=>
{
const
titleText
=
page
.
style
.
navigationBar
.
titleText
||
''
if
(
titleText
)
{
titlesJson
[
page
.
path
]
=
titleText
}
})
uniCliShared
.
parsePagesJsonOnce
(
inputDir
,
platform
)
.
pages
.
forEach
((
page
)
=>
{
const
titleText
=
page
.
style
.
navigationBar
.
titleText
||
''
if
(
titleText
)
{
titlesJson
[
page
.
path
]
=
titleText
}
})
}
debug
(
'
vite:uni:stat
'
)(
'
isEnable
'
,
isEnable
)
debug
__default
[
'
default
'
]
(
'
vite:uni:stat
'
)(
'
isEnable
'
,
isEnable
)
process
.
env
.
UNI_STAT_TITLE_JSON
=
JSON
.
stringify
(
titlesJson
)
return
{
define
:
{
...
...
@@ -57,7 +62,6 @@ module.exports = [
}
}),
]
function
isSsr
(
command
,
config
)
{
if
(
command
===
'
serve
'
)
{
return
!!
(
config
.
server
&&
config
.
server
.
middlewareMode
)
...
...
@@ -67,3 +71,5 @@ function isSsr(command, config) {
}
return
false
}
module
.
exports
=
index
packages/uni-stat/package.json
浏览文件 @
33152153
...
...
@@ -18,5 +18,9 @@
"bugs"
:
{
"url"
:
"https://github.com/dcloudio/uni-app/issues"
},
"gitHead"
:
"33e807d66e1fe47e2ee08ad9c59247e37b8884da"
"gitHead"
:
"33e807d66e1fe47e2ee08ad9c59247e37b8884da"
,
"dependencies"
:
{
"@dcloudio/uni-cli-shared"
:
"workspace:3.0.0-alpha-3021320211109003"
,
"debug"
:
"^4.3.2"
}
}
packages/uni-stat/src/plugin/index.ts
0 → 100644
浏览文件 @
33152153
import
type
{
ConfigEnv
,
UserConfig
}
from
'
vite
'
import
debug
from
'
debug
'
import
{
M
,
defineUniMainJsPlugin
,
getUniStatistics
,
parseManifestJsonOnce
,
parsePagesJsonOnce
,
}
from
'
@dcloudio/uni-cli-shared
'
export
default
[
defineUniMainJsPlugin
((
opts
)
=>
{
let
isEnable
=
false
return
{
name
:
'
vite:uni-stat
'
,
enforce
:
'
pre
'
,
config
(
config
,
env
)
{
if
(
isSsr
(
env
.
command
,
config
))
{
return
}
const
inputDir
=
process
.
env
.
UNI_INPUT_DIR
!
const
platform
=
process
.
env
.
UNI_PLATFORM
!
isEnable
=
getUniStatistics
(
inputDir
,
platform
).
enable
===
true
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
const
manifestJson
=
parseManifestJsonOnce
(
inputDir
)
if
(
!
manifestJson
.
appid
)
{
console
.
log
()
console
.
warn
(
M
[
'
stat.warn.appid
'
])
console
.
log
()
isEnable
=
false
}
}
const
titlesJson
=
Object
.
create
(
null
)
if
(
isEnable
)
{
parsePagesJsonOnce
(
inputDir
,
platform
).
pages
.
forEach
((
page
:
any
)
=>
{
const
titleText
=
page
.
style
.
navigationBar
.
titleText
||
''
if
(
titleText
)
{
titlesJson
[
page
.
path
]
=
titleText
}
})
}
debug
(
'
vite:uni:stat
'
)(
'
isEnable
'
,
isEnable
)
process
.
env
.
UNI_STAT_TITLE_JSON
=
JSON
.
stringify
(
titlesJson
)
return
{
define
:
{
'
process.env.UNI_STAT_TITLE_JSON
'
:
process
.
env
.
UNI_STAT_TITLE_JSON
,
},
}
},
transform
(
code
,
id
)
{
if
(
isEnable
&&
opts
.
filter
(
id
))
{
return
{
code
:
code
+
`;import '@dcloudio/uni-stat';`
,
map
:
null
,
}
}
},
}
}),
]
function
isSsr
(
command
:
ConfigEnv
[
'
command
'
],
config
:
UserConfig
)
{
if
(
command
===
'
serve
'
)
{
return
!!
(
config
.
server
&&
config
.
server
.
middlewareMode
)
}
if
(
command
===
'
build
'
)
{
return
!!
(
config
.
build
&&
config
.
build
.
ssr
)
}
return
false
}
packages/vite-plugin-uni/package.json
浏览文件 @
33152153
...
...
@@ -36,14 +36,10 @@
"estree-walker"
:
"^2.0.2"
,
"express"
:
"^4.17.1"
,
"fs-extra"
:
"^10.0.0"
,
"jsonc-parser"
:
"^3.0.0"
,
"mime"
:
"^2.5.2"
,
"module-alias"
:
"^2.2.2"
"jsonc-parser"
:
"^3.0.0"
},
"devDependencies"
:
{
"@types/express"
:
"^4.17.12"
,
"@types/mime"
:
"^2.0.3"
,
"@types/module-alias"
:
"^2.0.0"
,
"@types/sass"
:
"^1.16.0"
,
"@vue/babel-plugin-jsx"
:
"^1.1.1"
,
"chokidar"
:
"^3.5.2"
...
...
pnpm-lock.yaml
浏览文件 @
33152153
...
...
@@ -197,6 +197,7 @@ importers:
'
@rollup/pluginutils'
:
^4.1.1
'
@vue/compiler-core'
:
3.2.21
clean-css
:
^5.1.3
debug
:
^4.3.2
fs-extra
:
^10.0.0
postcss-import
:
^14.0.2
postcss-load-config
:
^3.1.0
...
...
@@ -208,6 +209,7 @@ importers:
'
@dcloudio/uni-shared'
:
link:../uni-shared
'
@rollup/pluginutils'
:
4.1.1
clean-css
:
5.2.2
debug
:
4.3.2
fs-extra
:
10.0.0
postcss-import
:
14.0.2
postcss-load-config
:
3.1.0
...
...
@@ -268,6 +270,7 @@ importers:
loader-utils
:
^1.1.0
lru-cache
:
^4.1.2
merge-source-map
:
^1.1.0
module-alias
:
^2.2.2
postcss
:
^8.3.8
postcss-comment
:
^2.0.0
postcss-import
:
^14.0.2
...
...
@@ -305,6 +308,7 @@ importers:
loader-utils
:
1.4.0
lru-cache
:
4.1.5
merge-source-map
:
1.1.0
module-alias
:
2.2.2
postcss
:
8.3.11
postcss-comment
:
2.0.0
postcss-import
:
14.0.2_postcss@8.3.11
...
...
@@ -336,6 +340,7 @@ importers:
'
@rollup/pluginutils'
:
^4.1.1
'
@types/hash-sum'
:
^1.0.0
'
@types/less'
:
^3.0.3
'
@types/mime'
:
^2.0.3
'
@types/stylus'
:
^0.48.36
'
@vue/compiler-core'
:
3.2.21
'
@vue/compiler-dom'
:
3.2.21
...
...
@@ -352,6 +357,8 @@ importers:
jsonc-parser
:
^3.0.0
magic-string
:
^0.25.7
merge
:
^2.1.1
mime
:
^3.0.0
module-alias
:
^2.2.2
postcss
:
^8.3.8
postcss-import
:
^14.0.2
postcss-load-config
:
^3.1.0
...
...
@@ -379,6 +386,8 @@ importers:
jsonc-parser
:
3.0.0
magic-string
:
0.25.7
merge
:
2.1.1
mime
:
3.0.0
module-alias
:
2.2.2
postcss-import
:
14.0.2_postcss@8.3.11
postcss-load-config
:
3.1.0
postcss-selector-parser
:
6.0.6
...
...
@@ -388,6 +397,7 @@ importers:
devDependencies
:
'
@types/hash-sum'
:
1.0.0
'
@types/less'
:
3.0.3
'
@types/mime'
:
2.0.3
'
@types/stylus'
:
0.48.36
'
@vue/compiler-sfc'
:
3.2.21
postcss
:
8.3.11
...
...
@@ -458,11 +468,15 @@ importers:
'
@dcloudio/uni-cli-shared'
:
3.0.0-alpha-3021320211109003
'
@dcloudio/uni-shared'
:
3.0.0-alpha-3021320211109003
'
@rollup/pluginutils'
:
^4.1.1
'
@types/mime'
:
^2.0.3
'
@vue/compiler-core'
:
3.2.21
'
@vue/compiler-dom'
:
3.2.21
'
@vue/compiler-sfc'
:
3.2.21
'
@vue/server-renderer'
:
3.2.21
debug
:
^4.3.2
esbuild
:
^0.13.2
mime
:
^3.0.0
module-alias
:
^2.2.2
dependencies
:
'
@dcloudio/uni-cli-shared'
:
link:../uni-cli-shared
'
@dcloudio/uni-shared'
:
link:../uni-shared
...
...
@@ -470,7 +484,11 @@ importers:
'
@vue/compiler-dom'
:
3.2.21
'
@vue/compiler-sfc'
:
3.2.21
'
@vue/server-renderer'
:
3.2.21_vue@3.2.21
debug
:
4.3.2
mime
:
3.0.0
module-alias
:
2.2.2
devDependencies
:
'
@types/mime'
:
2.0.3
'
@vue/compiler-core'
:
3.2.21
esbuild
:
0.13.12
...
...
@@ -607,6 +625,7 @@ importers:
'
@dcloudio/uni-shared'
:
3.0.0-alpha-3021320211109003
'
@vue/compiler-sfc'
:
3.2.21
base64url
:
^3.0.1
debug
:
^4.3.2
magic-string
:
^0.25.7
dependencies
:
'
@dcloudio/uni-cli-shared'
:
link:../uni-cli-shared
...
...
@@ -614,6 +633,7 @@ importers:
'
@dcloudio/uni-mp-vue'
:
link:../uni-mp-vue
'
@dcloudio/uni-shared'
:
link:../uni-shared
base64url
:
3.0.1
debug
:
4.3.2
magic-string
:
0.25.7
devDependencies
:
'
@vue/compiler-sfc'
:
3.2.21
...
...
@@ -657,7 +677,12 @@ importers:
'
@vue/runtime-core'
:
3.2.21
packages/uni-stat
:
specifiers
:
{}
specifiers
:
'
@dcloudio/uni-cli-shared'
:
workspace:3.0.0-alpha-3021320211109003
debug
:
^4.3.2
dependencies
:
'
@dcloudio/uni-cli-shared'
:
link:../uni-cli-shared
debug
:
4.3.2
packages/uni-vue
:
specifiers
:
...
...
@@ -673,8 +698,6 @@ importers:
'
@dcloudio/uni-shared'
:
3.0.0-alpha-3021320211109003
'
@rollup/pluginutils'
:
^4.1.1
'
@types/express'
:
^4.17.12
'
@types/mime'
:
^2.0.3
'
@types/module-alias'
:
^2.0.0
'
@types/sass'
:
^1.16.0
'
@vitejs/plugin-legacy'
:
^1.6.2
'
@vitejs/plugin-vue'
:
^1.9.4
...
...
@@ -690,8 +713,6 @@ importers:
express
:
^4.17.1
fs-extra
:
^10.0.0
jsonc-parser
:
^3.0.0
mime
:
^2.5.2
module-alias
:
^2.2.2
dependencies
:
'
@dcloudio/uni-cli-shared'
:
link:../uni-cli-shared
'
@dcloudio/uni-shared'
:
link:../uni-shared
...
...
@@ -708,12 +729,8 @@ importers:
express
:
4.17.1
fs-extra
:
10.0.0
jsonc-parser
:
3.0.0
mime
:
2.6.0
module-alias
:
2.2.2
devDependencies
:
'
@types/express'
:
4.17.13
'
@types/mime'
:
2.0.3
'
@types/module-alias'
:
2.0.1
'
@types/sass'
:
1.43.0
'
@vue/babel-plugin-jsx'
:
1.1.1
chokidar
:
3.5.2
...
...
@@ -2554,10 +2571,6 @@ packages:
resolution
:
{
integrity
:
sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==
}
dev
:
false
/@types/module-alias/2.0.1
:
resolution
:
{
integrity
:
sha512-DN/CCT1HQG6HquBNJdLkvV+4v5l/oEuwOHUPLxI+Eub0NED+lk0YUfba04WGH90EINiUrNgClkNnwGmbICeWMQ==
}
dev
:
true
/@types/ms/0.7.31
:
resolution
:
{
integrity
:
sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
}
dev
:
true
...
...
@@ -6623,9 +6636,9 @@ packages:
hasBin
:
true
requiresBuild
:
true
/mime/
2.6
.0
:
resolution
:
{
integrity
:
sha512-
USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg
==
}
engines
:
{
node
:
'
>=
4
.0.0'
}
/mime/
3.0
.0
:
resolution
:
{
integrity
:
sha512-
jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A
==
}
engines
:
{
node
:
'
>=
10
.0.0'
}
hasBin
:
true
dev
:
false
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录