Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
wychl
uni-app
提交
2bccd8c6
U
uni-app
项目概览
wychl
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
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,发现更多精彩内容 >>
提交
2bccd8c6
编写于
3月 12, 2020
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore(cli): remove unused
上级
28077f70
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
2 addition
and
50 deletion
+2
-50
packages/uni-cli-shared/lib/manifest.js
packages/uni-cli-shared/lib/manifest.js
+1
-10
packages/uni-cli-shared/lib/platform.js
packages/uni-cli-shared/lib/platform.js
+0
-12
packages/vue-cli-plugin-uni/generator.js
packages/vue-cli-plugin-uni/generator.js
+0
-2
packages/vue-cli-plugin-uni/lib/env.js
packages/vue-cli-plugin-uni/lib/env.js
+0
-9
packages/vue-cli-plugin-uni/lib/h5/index.js
packages/vue-cli-plugin-uni/lib/h5/index.js
+1
-8
packages/webpack-uni-pages-loader/lib/platforms/h5.js
packages/webpack-uni-pages-loader/lib/platforms/h5.js
+0
-9
未找到文件。
packages/uni-cli-shared/lib/manifest.js
浏览文件 @
2bccd8c6
...
...
@@ -50,11 +50,7 @@ function getH5Options (manifestJson) {
h5
.
title
=
h5
.
title
||
manifestJson
.
name
||
''
if
(
process
.
env
.
UNI_SUB_PLATFORM
===
'
mp-360
'
)
{
// 360 小程序仅支持 hash 模式
h5
.
router
=
Object
.
assign
({},
defaultRouter
)
}
else
{
h5
.
router
=
Object
.
assign
({},
defaultRouter
,
h5
.
router
||
{})
}
h5
.
router
=
Object
.
assign
({},
defaultRouter
,
h5
.
router
||
{})
h5
[
'
async
'
]
=
Object
.
assign
({},
defaultAsync
,
h5
[
'
async
'
]
||
{})
...
...
@@ -80,11 +76,6 @@ function getH5Options (manifestJson) {
h5
.
publicPath
=
base
}
if
(
process
.
env
.
UNI_SUB_PLATFORM
===
'
mp-360
'
)
{
h5
.
router
.
base
=
'
/
'
h5
.
publicPath
=
'
/
'
}
/* eslint-disable no-mixed-operators */
h5
.
template
=
h5
.
template
&&
path
.
resolve
(
process
.
env
.
UNI_INPUT_DIR
,
h5
.
template
)
||
path
.
resolve
(
__dirname
,
'
../../../../public/index.html
'
)
...
...
packages/uni-cli-shared/lib/platform.js
浏览文件 @
2bccd8c6
...
...
@@ -332,10 +332,6 @@ const PLATFORMS = {
}
}
// 解决 vue-cli-service lint 时 UNI_PLATFORM 不存在
if
(
process
.
env
.
UNI_PLATFORM
===
'
mp-360
'
)
{
process
.
env
.
UNI_PLATFORM
=
'
h5
'
process
.
env
.
UNI_SUB_PLATFORM
=
'
mp-360
'
}
process
.
env
.
UNI_PLATFORM
=
process
.
env
.
UNI_PLATFORM
||
'
h5
'
const
platform
=
PLATFORMS
[
process
.
env
.
UNI_PLATFORM
]
...
...
@@ -371,14 +367,6 @@ if (process.env.UNI_PLATFORM.indexOf('app-') === 0) {
preprocessContext
[
'
APP
'
]
=
true
}
preprocessContext
[
'
MP-360
'
]
=
false
preprocessContext
[
'
MP_360
'
]
=
false
if
(
process
.
env
.
UNI_SUB_PLATFORM
===
'
mp-360
'
)
{
preprocessContext
[
'
H5
'
]
=
false
preprocessContext
[
'
MP-360
'
]
=
true
preprocessContext
[
'
MP_360
'
]
=
true
}
if
(
process
.
UNI_SCRIPT_DEFINE
&&
Object
.
keys
(
process
.
UNI_SCRIPT_DEFINE
).
length
)
{
Object
.
keys
(
process
.
UNI_SCRIPT_DEFINE
).
forEach
(
name
=>
{
preprocessContext
[
name
]
=
process
.
UNI_SCRIPT_DEFINE
[
name
]
...
...
packages/vue-cli-plugin-uni/generator.js
浏览文件 @
2bccd8c6
...
...
@@ -17,7 +17,6 @@ module.exports = (api, options, rootOptions) => {
'
dev:mp-alipay
'
:
'
cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch
'
,
'
dev:mp-toutiao
'
:
'
cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch
'
,
'
dev:quickapp
'
:
'
cross-env NODE_ENV=development UNI_PLATFORM=quickapp vue-cli-service uni-build --watch
'
,
'
dev:mp-360
'
:
'
cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch
'
,
'
build:h5
'
:
'
cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build
'
,
'
build:mp-qq
'
:
'
cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build
'
,
'
build:mp-weixin
'
:
'
cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build
'
,
...
...
@@ -25,7 +24,6 @@ module.exports = (api, options, rootOptions) => {
'
build:mp-alipay
'
:
'
cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build
'
,
'
build:mp-toutiao
'
:
'
cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build
'
,
'
build:quickapp
'
:
'
cross-env NODE_ENV=production UNI_PLATFORM=quickapp vue-cli-service uni-build
'
,
'
build:mp-360
'
:
'
cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build
'
,
'
dev:custom
'
:
'
cross-env NODE_ENV=development uniapp-cli custom
'
,
'
build:custom
'
:
'
cross-env NODE_ENV=production uniapp-cli custom
'
},
...
...
packages/vue-cli-plugin-uni/lib/env.js
浏览文件 @
2bccd8c6
...
...
@@ -48,10 +48,6 @@ if (
console
.
warn
(
`发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart-H5`
)
}
if
(
process
.
env
.
UNI_PLATFORM
===
'
mp-360
'
)
{
process
.
env
.
UNI_PLATFORM
=
'
h5
'
process
.
env
.
UNI_SUB_PLATFORM
=
'
mp-360
'
}
// 初始化环境变量
const
defaultInputDir
=
'
../../../../src
'
...
...
@@ -71,11 +67,6 @@ process.env.VUE_APP_PLATFORM = process.env.UNI_PLATFORM
process
.
env
.
UNI_INPUT_DIR
=
process
.
env
.
UNI_INPUT_DIR
||
path
.
resolve
(
__dirname
,
defaultInputDir
)
process
.
env
.
UNI_OUTPUT_DIR
=
process
.
env
.
UNI_OUTPUT_DIR
||
path
.
resolve
(
__dirname
,
defaultOutputDir
)
if
(
process
.
env
.
UNI_SUB_PLATFORM
===
'
mp-360
'
)
{
const
outputDir
=
process
.
env
.
UNI_OUTPUT_DIR
process
.
env
.
UNI_OUTPUT_DIR
=
path
.
resolve
(
outputDir
.
substr
(
0
,
outputDir
.
lastIndexOf
(
'
h5
'
)),
'
mp-360/dist
'
)
}
if
(
process
.
env
.
UNI_PLATFORM
===
'
app-plus
'
)
{
process
.
env
.
UNI_OUTPUT_TMP_DIR
=
path
.
resolve
(
process
.
env
.
UNI_OUTPUT_DIR
,
'
../.tmp/app-plus
'
)
}
...
...
packages/vue-cli-plugin-uni/lib/h5/index.js
浏览文件 @
2bccd8c6
...
...
@@ -104,13 +104,6 @@ module.exports = {
const
beforeCode
=
(
useBuiltIns
===
'
entry
'
?
`import '@babel/polyfill';`
:
''
)
+
`import 'uni-pages';import 'uni-
${
process
.
env
.
UNI_PLATFORM
}
';`
const
qihooCode
=
process
.
env
.
UNI_SUB_PLATFORM
===
'
mp-360
'
?
`
import qh from 'uni-qh';
global.qh = qh;
global.onAppShow = function(){};
`
:
''
return
{
devtool
:
process
.
env
.
NODE_ENV
===
'
production
'
?
false
:
'
cheap-module-eval-source-map
'
,
resolve
:
{
...
...
@@ -128,7 +121,7 @@ global.onAppShow = function(){};
loader
:
'
wrap-loader
'
,
options
:
{
before
:
[
qihooCode
+
beforeCode
+
statCode
+
getGlobalUsingComponentsCode
()
beforeCode
+
statCode
+
getGlobalUsingComponentsCode
()
]
}
}]
...
...
packages/webpack-uni-pages-loader/lib/platforms/h5.js
浏览文件 @
2bccd8c6
...
...
@@ -66,10 +66,6 @@ const getPageComponents = function (inputDir, pagesJson) {
globalStyle
[
'
h5
'
]
||
{}
)
if
(
process
.
env
.
UNI_SUB_PLATFORM
===
'
mp-360
'
)
{
Object
.
assign
(
globalStyle
,
globalStyle
[
'
mp-360
'
]
||
{})
}
process
.
UNI_H5_PAGES_JSON
=
{
pages
:
{},
globalStyle
...
...
@@ -94,10 +90,6 @@ const getPageComponents = function (inputDir, pagesJson) {
// 解析 titleNView,pullToRefresh
const
h5Options
=
Object
.
assign
({},
props
[
'
app-plus
'
]
||
{},
props
[
'
h5
'
]
||
{})
if
(
process
.
env
.
UNI_SUB_PLATFORM
===
'
mp-360
'
)
{
Object
.
assign
(
h5Options
,
props
[
'
mp-360
'
]
||
{})
Object
.
assign
(
props
,
props
[
'
mp-360
'
]
||
{})
}
removePlatformStyle
(
h5Options
)
if
(
h5Options
.
hasOwnProperty
(
'
titleNView
'
))
{
...
...
@@ -130,7 +122,6 @@ const getPageComponents = function (inputDir, pagesJson) {
// 删除 app-plus 平台配置
delete
props
[
'
app-plus
'
]
delete
props
[
'
h5
'
]
delete
props
[
'
mp-360
'
]
process
.
UNI_H5_PAGES_JSON
.
pages
[
page
.
path
]
=
props
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录