Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ChenYFan_OHHH
uni-app
提交
67fda1e5
U
uni-app
项目概览
ChenYFan_OHHH
/
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,发现更多精彩内容 >>
提交
67fda1e5
编写于
6月 17, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: scripts/build
上级
799b9dd0
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
51 addition
and
180 deletion
+51
-180
packages/size-check/package.json
packages/size-check/package.json
+0
-3
packages/uni-app/dist/uni-app.d.ts
packages/uni-app/dist/uni-app.d.ts
+0
-61
packages/uni-cli-shared/package.json
packages/uni-cli-shared/package.json
+0
-3
packages/uni-h5-vite/package.json
packages/uni-h5-vite/package.json
+0
-3
packages/uni-h5/package.json
packages/uni-h5/package.json
+0
-3
packages/uni-i18n/dist/uni-i18n.d.ts
packages/uni-i18n/dist/uni-i18n.d.ts
+0
-56
packages/uni-mp-vue/package.json
packages/uni-mp-vue/package.json
+0
-6
packages/vite-plugin-uni/package.json
packages/vite-plugin-uni/package.json
+0
-3
scripts/build.js
scripts/build.js
+46
-38
scripts/utils.js
scripts/utils.js
+5
-4
未找到文件。
packages/size-check/package.json
浏览文件 @
67fda1e5
...
...
@@ -2,9 +2,6 @@
"private"
:
true
,
"name"
:
"@dcloudio/size-check"
,
"version"
:
"3.0.0-alpha-3000020210611006"
,
"buildOptions"
:
{
"bundler"
:
"vite"
},
"dependencies"
:
{
"vue-router"
:
"^4.0.8"
}
...
...
packages/uni-app/dist/uni-app.d.ts
已删除
100644 → 0
浏览文件 @
799b9dd0
import
{
ComponentInternalInstance
}
from
'
vue
'
;
import
{
ref
}
from
'
vue
'
;
import
{
shallowRef
}
from
'
vue
'
;
export
declare
function
getSsrGlobalData
():
any
;
export
declare
const
onAddToFavorites
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onBackPress
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onError
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onHide
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onLaunch
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onNavigationBarButtonTap
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onNavigationBarSearchInputChanged
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onNavigationBarSearchInputClicked
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onNavigationBarSearchInputConfirmed
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onNavigationBarSearchInputFocusChanged
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onPageNotFound
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onPageScroll
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onPullDownRefresh
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onReachBottom
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onReady
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onResize
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onShareAppMessage
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onShareTimeline
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onShow
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onTabItemTap
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onThemeChange
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onUnhandledRejection
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
const
onUnload
:
(
hook
:
()
=>
any
,
target
?:
ComponentInternalInstance
|
null
)
=>
any
;
export
declare
function
resolveEasycom
(
component
:
unknown
,
easycom
:
unknown
):
unknown
;
export
declare
const
shallowSsrRef
:
SSRRef
;
declare
type
SSRRef
=
(
value
:
unknown
,
key
?:
string
,
shallow
?:
boolean
)
=>
ReturnType
<
typeof
ref
>
|
ReturnType
<
typeof
shallowRef
>
;
export
declare
const
ssrRef
:
SSRRef
;
export
{
}
packages/uni-cli-shared/package.json
浏览文件 @
67fda1e5
...
...
@@ -9,9 +9,6 @@
"dist/**/*.d.ts"
,
"lib"
],
"buildOptions"
:
{
"bundler"
:
"tsc"
},
"repository"
:
{
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
packages/uni-h5-vite/package.json
浏览文件 @
67fda1e5
...
...
@@ -8,9 +8,6 @@
"dist/**/*.js"
,
"dist/**/*.d.ts"
],
"buildOptions"
:
{
"bundler"
:
"tsc"
},
"repository"
:
{
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
packages/uni-h5/package.json
浏览文件 @
67fda1e5
...
...
@@ -10,9 +10,6 @@
"style"
],
"sideEffects"
:
false
,
"buildOptions"
:
{
"bundler"
:
"vite"
},
"repository"
:
{
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
packages/uni-i18n/dist/uni-i18n.d.ts
已删除
100644 → 0
浏览文件 @
799b9dd0
export
declare
type
BuiltInLocale
=
typeof
LOCALE_ZH_HANS
|
typeof
LOCALE_ZH_HANT
|
typeof
LOCALE_EN
|
typeof
LOCALE_FR
|
typeof
LOCALE_ES
;
export
declare
interface
Formatter
{
interpolate
:
(
message
:
string
,
values
?:
Record
<
string
,
unknown
>
|
Array
<
unknown
>
)
=>
Array
<
unknown
>
;
}
export
declare
class
I18n
{
private
locale
;
private
fallbackLocale
;
private
message
;
private
messages
;
private
watchers
;
private
formater
;
constructor
({
locale
,
fallbackLocale
,
messages
,
watcher
,
formater
,
}:
I18nOptions
);
setLocale
(
locale
:
string
):
void
;
getLocale
():
BuiltInLocale
;
watchLocale
(
fn
:
LocaleWatcher
):
()
=>
void
;
add
(
locale
:
BuiltInLocale
,
message
:
Record
<
string
,
string
>
):
void
;
t
(
key
:
string
,
values
?:
Record
<
string
,
unknown
>
|
Array
<
unknown
>
|
BuiltInLocale
):
string
;
t
(
key
:
string
,
locale
?:
BuiltInLocale
,
values
?:
Record
<
string
,
unknown
>
|
Array
<
unknown
>
):
string
;
}
export
declare
interface
I18nOptions
{
locale
:
BuiltInLocale
;
fallbackLocale
?:
BuiltInLocale
;
messages
?:
LocaleMessages
;
formater
?:
Formatter
;
watcher
?:
LocaleWatcher
;
}
export
declare
function
initVueI18n
(
locale
?:
BuiltInLocale
,
messages
?:
LocaleMessages
,
fallbackLocale
?:
BuiltInLocale
):
{
i18n
:
I18n
;
t
(
key
:
string
,
values
?:
Record
<
string
,
unknown
>
|
unknown
[]
|
undefined
):
string
;
add
(
locale
:
BuiltInLocale
,
message
:
Record
<
string
,
string
>
):
void
;
getLocale
():
BuiltInLocale
;
setLocale
(
newLocale
:
BuiltInLocale
):
void
;
};
export
declare
const
LOCALE_EN
=
"
en
"
;
export
declare
const
LOCALE_ES
=
"
es
"
;
export
declare
const
LOCALE_FR
=
"
fr
"
;
export
declare
const
LOCALE_ZH_HANS
=
"
zh-Hans
"
;
export
declare
const
LOCALE_ZH_HANT
=
"
zh-Hant
"
;
export
declare
type
LocaleMessages
=
{
[
name
in
BuiltInLocale
]?:
Record
<
string
,
string
>
;
};
export
declare
type
LocaleWatcher
=
(
newLocale
:
BuiltInLocale
,
oldLocale
:
BuiltInLocale
)
=>
void
;
export
{
}
packages/uni-mp-vue/package.json
浏览文件 @
67fda1e5
...
...
@@ -7,12 +7,6 @@
"files"
:
[
"dist"
],
"buildOptions"
:
{
"name"
:
"Vue"
,
"formats"
:
[
"esm-bundler-vue"
]
},
"sideEffects"
:
false
,
"repository"
:
{
"type"
:
"git"
,
...
...
packages/vite-plugin-uni/package.json
浏览文件 @
67fda1e5
...
...
@@ -12,9 +12,6 @@
"dist/**/*.d.ts"
,
"lib"
],
"buildOptions"
:
{
"bundler"
:
"tsc"
},
"repository"
:
{
"type"
:
"git"
,
"url"
:
"git+https://github.com/dcloudio/uni-app.git"
,
...
...
scripts/build.js
浏览文件 @
67fda1e5
...
...
@@ -9,7 +9,7 @@ const { targets: allTargets, fuzzyMatchTarget } = require('./utils')
const
args
=
require
(
'
minimist
'
)(
process
.
argv
.
slice
(
2
))
const
targets
=
args
.
_
const
formats
=
args
.
formats
||
args
.
f
//
const formats = args.formats || args.f
const
devOnly
=
args
.
devOnly
||
args
.
d
const
isRelease
=
args
.
release
const
buildTypes
=
args
.
t
||
args
.
types
||
isRelease
...
...
@@ -40,22 +40,29 @@ async function build(target) {
if
(
isRelease
&&
pkg
.
private
)
{
return
}
const
tsconfigJsonPath
=
path
.
resolve
(
pkgDir
,
'
tsconfig.json
'
)
let
hasTscBundler
=
false
const
hasViteBundler
=
fs
.
existsSync
(
path
.
resolve
(
pkgDir
,
'
vite.config.ts
'
))
if
(
fs
.
existsSync
(
tsconfigJsonPath
))
{
const
tsconfigJson
=
require
(
tsconfigJsonPath
)
if
(
tsconfigJson
.
extends
&&
tsconfigJson
.
extends
.
includes
(
'
tsconfig.node.json
'
)
)
{
hasTscBundler
=
true
}
}
const
hasRollupBundler
=
fs
.
existsSync
(
path
.
resolve
(
pkgDir
,
'
build.json
'
))
const
bundler
=
pkg
.
buildOptions
&&
pkg
.
buildOptions
.
bundler
const
types
=
target
===
'
uni-shared
'
||
target
===
'
uni-i18n
'
||
target
===
'
uni-app
'
||
target
===
'
uni-cli-shared
'
||
(
buildTypes
&&
pkg
.
types
)
const
types
=
target
.
endsWith
(
'
-shared
'
)
||
(
buildTypes
&&
pkg
.
types
)
// if building a specific format, do not remove dist.
if
(
!
formats
&&
bundler
!==
'
vite
'
)
{
//
if (!formats && bundler !== 'vite') {
await
fs
.
remove
(
`
${
pkgDir
}
/dist`
)
}
//
}
const
env
=
devOnly
?
'
development
'
:
'
production
'
if
(
bundler
===
'
vite
'
)
{
if
(
hasViteBundler
)
{
await
execa
(
'
vite
'
,
[
'
build
'
,
'
--config
'
,
path
.
resolve
(
pkgDir
,
'
vite.config.ts
'
)],
...
...
@@ -64,10 +71,8 @@ async function build(target) {
env
:
Object
.
assign
({
FORMAT
:
'
es
'
},
process
.
env
),
}
)
if
(
target
===
'
size-check
'
)
{
return
}
return
await
execa
(
if
(
target
===
'
uni-h5
'
)
{
await
execa
(
'
vite
'
,
[
'
build
'
,
'
--config
'
,
path
.
resolve
(
pkgDir
,
'
vite.config.ts
'
)],
{
...
...
@@ -75,7 +80,9 @@ async function build(target) {
env
:
Object
.
assign
({
FORMAT
:
'
cjs
'
},
process
.
env
),
}
)
}
else
if
(
bundler
===
'
tsc
'
)
{
}
}
if
(
hasTscBundler
)
{
const
args
=
[
'
--listEmittedFiles
'
,
'
-p
'
,
...
...
@@ -84,11 +91,11 @@ async function build(target) {
if
(
types
)
{
args
.
push
(
'
--declaration
'
)
}
return
await
execa
(
'
tsc
'
,
args
,
{
await
execa
(
'
tsc
'
,
args
,
{
stdio
:
'
inherit
'
,
})
}
if
(
hasRollupBundler
)
{
await
execa
(
'
rollup
'
,
[
...
...
@@ -103,4 +110,5 @@ async function build(target) {
if
(
types
)
{
await
extract
(
target
)
}
}
}
scripts/utils.js
浏览文件 @
67fda1e5
...
...
@@ -15,8 +15,8 @@ const priority = {
'
uni-quickapp-webview
'
:
70
,
'
uni-cli-shared
'
:
60
,
'
uni-h5
'
:
50
,
'
uni-h5-vue
'
:
40
,
'
uni-h5-vite
'
:
40
,
'
uni-app-vue
'
:
35
,
'
uni-app-plus
'
:
30
,
'
uni-app-vite
'
:
30
,
'
vite-plugin-uni
'
:
20
,
...
...
@@ -30,9 +30,10 @@ const targets = (exports.targets = fs.readdirSync('packages').filter((f) => {
try
{
return
(
fs
.
existsSync
(
path
.
resolve
(
__dirname
,
`../packages/
${
f
}
/build.json`
))
||
fs
.
existsSync
(
path
.
resolve
(
__dirname
,
`../packages/
${
f
}
/build.js`
))
||
!!
require
(
path
.
resolve
(
__dirname
,
`../packages/
${
f
}
/package.json`
))
.
buildOptions
fs
.
existsSync
(
path
.
resolve
(
__dirname
,
`../packages/
${
f
}
/vite.config.ts`
)
)
||
fs
.
existsSync
(
path
.
resolve
(
__dirname
,
`../packages/
${
f
}
/tsconfig.json`
))
)
}
catch
(
e
)
{}
return
false
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录