Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project
jinfa-admin
Commits
5b5cf911
Commit
5b5cf911
authored
Nov 18, 2021
by
前端-许佳敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 优化构建流程
parent
601ec268
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
14 deletions
+24
-14
config.ts
config/config.ts
+3
-0
env.js
env.js
+1
-0
package.json
package.json
+9
-9
ytt.config.ts
ytt.config.ts
+11
-5
No files found.
config/config.ts
View file @
5b5cf911
...
...
@@ -10,6 +10,9 @@ import proxy from './proxy'
import
CaseSensitivePathsWebpackPlugins
from
'case-sensitive-paths-webpack-plugin'
import
theme
from
'./theme.config'
if
(
!
process
.
env
.
SITE_ID
||
!
process
.
env
.
BACK_GATEWAY
||
!
process
.
env
.
SOCKET_URL
)
{
throw
`请检查环境变量是否传入,
${
process
.
env
.
PRO_ENV
}
`
}
export
default
defineConfig
({
title
:
'瓴犀平台后台'
,
// 如需写入环境变量 需在config中先写入
...
...
env.js
View file @
5b5cf911
...
...
@@ -99,6 +99,7 @@ module.exports = {
BACK_GATEWAY
:
'http://10.0.0.17:8100'
,
USE_ROUTE_CONFIG
:
true
,
SOCKET_URL
:
'ws://10.0.0.17:8100'
,
YAPI_URL
:
'http://10.0.0.25:4000/'
,
ssh
:
JSON
.
stringify
({
user
:
"root"
,
// Password optional, prompted if none given
...
...
package.json
View file @
5b5cf911
...
...
@@ -3,13 +3,13 @@
"version"
:
"1.0.4"
,
"private"
:
true
,
"scripts"
:
{
"upload:scm"
:
"cross-env
local
=scm taskName=upload yarn scripts:build"
,
"upload:10"
:
"cross-env
local
=10 taskName=upload yarn scripts:build"
,
"upload:25"
:
"cross-env
local
=25 taskName=upload yarn scripts:build"
,
"upload:v2"
:
"cross-env
local
=v2 taskName=upload yarn scripts:build"
,
"upload:v2Preview"
:
"cross-env
local
=v2Preview taskName=upload yarn scripts:build"
,
"upload:study"
:
"cross-env
local
=study taskName=upload yarn scripts:build"
,
"upload:v2Test"
:
"cross-env
local
=v2Test taskName=upload yarn scripts:build"
,
"upload:scm"
:
"cross-env
PRO_ENV
=scm taskName=upload yarn scripts:build"
,
"upload:10"
:
"cross-env
PRO_ENV
=10 taskName=upload yarn scripts:build"
,
"upload:25"
:
"cross-env
PRO_ENV
=25 taskName=upload yarn scripts:build"
,
"upload:v2"
:
"cross-env
PRO_ENV
=v2 taskName=upload yarn scripts:build"
,
"upload:v2Preview"
:
"cross-env
PRO_ENV
=v2Preview taskName=upload yarn scripts:build"
,
"upload:study"
:
"cross-env
PRO_ENV
=study taskName=upload yarn scripts:build"
,
"upload:v2Test"
:
"cross-env
PRO_ENV
=v2Test taskName=upload yarn scripts:build"
,
"api"
:
"god-ytt"
,
"start:analyze"
:
"ANALYZE=1 umi dev"
,
"scripts:build"
:
"node scripts/run"
,
...
...
@@ -24,7 +24,7 @@
"build:scm"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com yarn build"
,
"build:all"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lingxi-all.wg.shushangyun.com SOCKET_URL=ws://lingxi-all.wg.shushangyun.com yarn build"
,
"build:10"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 SOCKET_URL=ws://10.0.0.10:9400 yarn build"
,
"build:v2"
:
"cross-env
SITE_ID=1 BACK_GATEWAY=http://10.0.0.17:8100 SOCKET_URL=ws://10.0.0.17:9880
yarn build"
,
"build:v2"
:
"cross-env
PRO_ENV=v2
yarn build"
,
"build:v2Preview"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.220:8100 SOCKET_URL=ws://10.0.1.220:9400 yarn build"
,
"build:25"
:
"cross-env SITE_ID=352 BACK_GATEWAY=http://10.0.0.25:8100 SOCKET_URL=ws://10.0.0.25:9400 yarn build"
,
"build:study"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.207:8100 SOCKET_URL=ws://10.0.1.207:9400 yarn build"
,
...
...
@@ -37,7 +37,7 @@
"start:cross-dev"
:
"cross-env SITE_ID=352 SOCKET_URL=ws://10.0.0.25:9400 yarn start:dev"
,
"start:10"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.10:8100 SOCKET_URL=ws://10.0.0.10:9400 yarn start"
,
"start:25"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.0.25:8100 SOCKET_URL=ws://10.0.0.25:9400 yarn start"
,
"start:v2"
:
"cross-env
SITE_ID=1 BACK_GATEWAY=http://10.0.0.17:8100 SOCKET_URL=ws://10.0.0.17:9880
yarn start"
,
"start:v2"
:
"cross-env
PRO_ENV=v2
yarn start"
,
"start:v2Preview"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://10.0.1.220:8100 SOCKET_URL=ws://10.0.1.220:9400 yarn start"
,
"start:v2Test"
:
"cross-env SITE_ID=1 BACK_GATEWAY=http://lx-pre-gateway.shushangyun.com USE_ROUTE_CONFIG=false SOCKET_URL=ws://lx-pre-gateway.shushangyun.com yarn start"
,
"start:scm"
:
"cross-env BACK_GATEWAY=http://lingxi-scm.wg.shushangyun.com SOCKET_URL=ws://lingxi-scm.wg.shushangyun.com SITE_ID=1 yarn start"
,
...
...
ytt.config.ts
View file @
5b5cf911
const
YAPI_URL
=
require
(
'./env.js'
)[
process
.
env
.
PRO_ENV
]
if
(
!
YAPI_URL
)
{
throw
'yapi链接不存在'
}
const
tokenList
=
[
{
name
:
'ProductV2'
,
token
:
'df37f2a0e3829c4288708ae211920bdbdee55e5e2f48b1e8cf7d1925ac618d9a'
,
categoryIds
:
[
0
]
},
// 商品服务V2
{
name
:
'TemplateV2'
,
token
:
'7bb5578bc50e4e7935cbc146a2192e978053d5380cc96fcfdc0a754cfe885ec5'
,
categoryIds
:
[
0
]
},
// 店铺模板服务
{
name
:
'PayV2'
,
token
:
'4b5f2f2d42f0774b61074d69d5d756c725ba067d9dafe2c3785f592ae85d1696'
,
categoryIds
:
[
0
]
},
// 支付服务
{
name
:
'PayV2'
,
token
:
'4b5f2f2d42f0774b61074d69d5d756c725ba067d9dafe2c3785f592ae85d1696'
,
categoryIds
:
[
0
]
},
// 支付服务
V2
{
name
:
'SearchV2'
,
token
:
'f3e6ec26764f54d06ba33f487ff42d7debeaef397e51dc395040447737eb2e66'
,
categoryIds
:
[
0
]
},
// 搜索服务V2
{
name
:
'PurchaseV2'
,
token
:
'5f5468ce1cac41c42359a64cb2d1a96e609226bed219727a32bb90467cdd2a75'
,
categoryIds
:
[
0
]
},
//采购服务
{
name
:
'EnhanceV2'
,
token
:
'f3400c8a9e46e7b3acbc5585f915df9e4badefb36f312486ad30df47563063b9'
,
categoryIds
:
[
0
]
},
// 加工服务
{
name
:
'AfterServiceV2'
,
token
:
'c7d26d1f7df05ac202074603d53ce7985d7b8d5462425b3bd592ac4c00686b85'
,
categoryIds
:
[
0
]
},
// 售后服务
{
name
:
'PurchaseV2'
,
token
:
'5f5468ce1cac41c42359a64cb2d1a96e609226bed219727a32bb90467cdd2a75'
,
categoryIds
:
[
0
]
},
//采购服务
V2
{
name
:
'EnhanceV2'
,
token
:
'f3400c8a9e46e7b3acbc5585f915df9e4badefb36f312486ad30df47563063b9'
,
categoryIds
:
[
0
]
},
// 加工服务
V2
{
name
:
'AfterServiceV2'
,
token
:
'c7d26d1f7df05ac202074603d53ce7985d7b8d5462425b3bd592ac4c00686b85'
,
categoryIds
:
[
0
]
},
// 售后服务
V2
{
name
:
'ManageV2'
,
token
:
'9ee3a1cb5a73ca02935e70debeda5bde0464f2fe1eb32c25855fd8acff9f68f2'
,
categoryIds
:
[
0
]
},
// 平台后台v2
{
name
:
'MemberV2'
,
token
:
'be87c2732cb1253f82fe6c27d6cca9982c7dca9b384e46cc2e797b5835846834'
,
categoryIds
:
[
0
]
},
//会员服务 V2
{
name
:
'ReportV2'
,
token
:
'dab50c384c27f1c981a03f2c44ad76d1e7e1f60b4520bd279cea67f5cf146cee'
,
categoryIds
:
[
0
]
},
// 报表服务v2
...
...
@@ -18,7 +24,7 @@ const tokenList = [
]
const
getConfigMap
=
(
tokens
)
=>
tokens
.
map
(
v
=>
({
serverUrl
:
'http://10.0.0.25:4000/'
,
serverUrl
:
YAPI_URL
,
typesOnly
:
false
,
reactHooks
:
{
enabled
:
false
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment