Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks-h5
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
quantum-blocks-h5
Commits
c648bdcc
Commit
c648bdcc
authored
Mar 11, 2022
by
郭志伟
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/testEnvBuild' into 'master'
Fix/test env build See merge request
!72
parents
223a50ce
9355a4b0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
39 deletions
+20
-39
dev.config.ts
app/web/config/dev.config.ts
+3
-3
index.ts
app/web/config/index.ts
+1
-1
server.js
bin/server.js
+1
-0
apollo.json
config/apollo.json
+9
-17
apollo.ssr.json
config/apollo.ssr.json
+1
-14
package.json
package.json
+3
-3
webpack.config.js
webpack.config.js
+2
-1
No files found.
app/web/config/dev.config.ts
View file @
c648bdcc
...
@@ -2,10 +2,10 @@ import apolloSsr from '../../../config/apollo.ssr.json';
...
@@ -2,10 +2,10 @@ import apolloSsr from '../../../config/apollo.ssr.json';
const
protocol
=
EASY_ENV_IS_BROWSER
?
window
.
location
.
protocol
:
'
https:
'
;
const
protocol
=
EASY_ENV_IS_BROWSER
?
window
.
location
.
protocol
:
'
https:
'
;
const
hostMap
=
{
const
hostMap
=
{
apiHost
:
`
${
protocol
}
//quantum-blocks-t
ob
.liangkebang.net`
,
apiHost
:
`
${
protocol
}
//quantum-blocks-t
est1
.liangkebang.net`
,
kdspHost
:
`
${
protocol
}
//talos-t
ob
.liangkebang.net`
,
kdspHost
:
`
${
protocol
}
//talos-t
est1
.liangkebang.net`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
mallHost
:
`
${
protocol
}
//mall-t
ob
.liangkebang.net`
,
mallHost
:
`
${
protocol
}
//mall-t
est1
.liangkebang.net`
,
test
:
true
,
test
:
true
,
yxmTenantId
:
560761
,
yxmTenantId
:
560761
,
appIdMap
:
{
appIdMap
:
{
...
...
app/web/config/index.ts
View file @
c648bdcc
...
@@ -3,4 +3,4 @@ import dev from './dev.config';
...
@@ -3,4 +3,4 @@ import dev from './dev.config';
import
test
from
'
./test.config
'
;
import
test
from
'
./test.config
'
;
// export default process.env.NODE_ENV === 'test' ? test : process.env.NODE_ENV === 'production' ? prod : dev;
// export default process.env.NODE_ENV === 'test' ? test : process.env.NODE_ENV === 'production' ? prod : dev;
export
default
process
.
env
.
SENTRY_ENV
?
test
:
process
.
env
.
NODE_ENV
===
'
production
'
?
prod
:
dev
;
export
default
process
.
env
.
COS_ENV
===
'
test
'
?
test
:
process
.
env
.
NODE_ENV
===
'
production
'
?
prod
:
dev
;
bin/server.js
View file @
c648bdcc
...
@@ -16,6 +16,7 @@ npm.load(() => {
...
@@ -16,6 +16,7 @@ npm.load(() => {
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
npm
.
run
(
"
start
"
);
npm
.
run
(
"
start
"
);
}
else
{
}
else
{
npm
.
run
(
"
ii
"
);
npm
.
run
(
"
test
"
);
npm
.
run
(
"
test
"
);
}
}
});
});
...
...
config/apollo.json
View file @
c648bdcc
{
{
"api"
:
{
"api"
:
{
"apiHost"
:
"https://quantum-blocks-
vcc2
.liangkebang.net"
,
"apiHost"
:
"https://quantum-blocks-
undefined
.liangkebang.net"
,
"h5Host"
:
"https://quantum-h5-
vcc2
.liangkebang.net"
,
"h5Host"
:
"https://quantum-h5-
undefined
.liangkebang.net"
,
"opapiHost"
:
"https://opapi-
vcc2
.liangkebang.net"
,
"opapiHost"
:
"https://opapi-
undefined
.liangkebang.net"
,
"passportHost"
:
"https://passportapi-
vcc2
.liangkebang.net"
,
"passportHost"
:
"https://passportapi-
undefined
.liangkebang.net"
,
"kdspHost"
:
"https://talos-
vcc2
.liangkebang.net"
,
"kdspHost"
:
"https://talos-
undefined
.liangkebang.net"
,
"loginUrl"
:
""
,
"loginUrl"
:
""
,
"h5ShopHost"
:
"https://tenet-vcc2.liangkebang.net/#"
,
"h5ShopHost"
:
"https://tenet-undefined.liangkebang.net/#"
,
"mallHost"
:
"https://mall-undefined.liangkebang.net"
,
"yxmTenantId"
:
560761
,
"yxmTenantId"
:
560761
,
"appIdMap"
:
{
"appIdMap"
:
{
"560761"
:
"wxe16bf9293671506c"
,
"560761"
:
"wxe16bf9293671506c"
,
"560867"
:
"wxccb8435d68e8c7d6"
"560867"
:
"wxccb8435d68e8c7d6"
}
}
},
},
"mysql"
:
{
"low_code"
:
{
"host"
:
"172.17.5.24"
,
"port"
:
"30487"
,
"username"
:
"qa"
,
"password"
:
"qatest"
,
"database"
:
"low_code"
}
},
"redis"
:
{
"redis"
:
{
"
host"
:
"172.17.5.13
"
,
"
port"
:
"undefined
"
,
"
port"
:
"31565
"
,
"
host"
:
"undefined
"
,
"password"
:
""
,
"password"
:
""
,
"db"
:
0
"db"
:
0
},
},
...
...
config/apollo.ssr.json
View file @
c648bdcc
{
{
"apiHost"
:
"https://quantum-blocks-undefined.liangkebang.net","h5Host"
:
"https://quantum-h5-undefined.liangkebang.net","opapiHost"
:
"https://opapi-undefined.liangkebang.net","passportHost"
:
"https://passportapi-undefined.liangkebang.net","kdspHost"
:
"https://talos-undefined.liangkebang.net","loginUrl"
:
"","h5ShopHost"
:
"https://tenet-undefined.liangkebang.net/#","mallHost"
:
"https://mall-undefined.liangkebang.net","yxmTenantId"
:
560761
,
"appIdMap"
:{
"560761"
:
"wxe16bf9293671506c","560867"
:
"wxccb8435d68e8c7d6"},"qiniuUpHost"
:
"https://up-z0.qiniup.com","qiniuHost"
:
"https://appsync.lkbang.net"
}
"apiHost"
:
"https://quantum-blocks-vcc2.liangkebang.net"
,
\ No newline at end of file
"h5Host"
:
"https://quantum-h5-vcc2.liangkebang.net"
,
"opapiHost"
:
"https://opapi-vcc2.liangkebang.net"
,
"passportHost"
:
"https://passportapi-vcc2.liangkebang.net"
,
"kdspHost"
:
"https://talos-vcc2.liangkebang.net"
,
"loginUrl"
:
""
,
"h5ShopHost"
:
"https://tenet-vcc2.liangkebang.net/#"
,
"yxmTenantId"
:
560761
,
"appIdMap"
:
{
"560761"
:
"wxe16bf9293671506c"
,
"560867"
:
"wxccb8435d68e8c7d6"
}
}
\ No newline at end of file
package.json
View file @
c648bdcc
...
@@ -5,21 +5,21 @@
...
@@ -5,21 +5,21 @@
"scripts"
:
{
"scripts"
:
{
"start"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3C egg-scripts start --port 9050"
,
"start"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3C egg-scripts start --port 9050"
,
"start:pre"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE egg-scripts start --port 9050"
,
"start:pre"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE egg-scripts start --port 9050"
,
"test"
:
"cross-env NODE_ENV=production EGG_SERVER_ENV=sit
DEBUG=apollo APOLLO_CLUSTER=k8s NAMESPACE=qa2
egg-scripts start --port 80 --workers 1"
,
"test"
:
"cross-env NODE_ENV=production EGG_SERVER_ENV=sit egg-scripts start --port 80 --workers 1"
,
"stop"
:
"egg-scripts stop"
,
"stop"
:
"egg-scripts stop"
,
"backend"
:
"nohup egg-scripts start --port 7001 --workers 4"
,
"backend"
:
"nohup egg-scripts start --port 7001 --workers 4"
,
"dev"
:
"egg-bin dev -r egg-ts-helper/register"
,
"dev"
:
"egg-bin dev -r egg-ts-helper/register"
,
"debug"
:
"egg-bin debug -r egg-ts-helper/register"
,
"debug"
:
"egg-bin debug -r egg-ts-helper/register"
,
"apollo"
:
"node bin/apollo.js"
,
"apollo"
:
"node bin/apollo.js"
,
"build"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool"
,
"build"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3C npm run apollo && cross-env COS_ENV=production easy build --devtool"
,
"build:test"
:
"cross-env NODE_ENV=test APOLLO_CLUSTER=k8s npm run apollo && cross-env COS_ENV=test easy build --devtool"
,
"build:pre"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE npm run apollo && cross-env COS_ENV=production easy build --devtool"
,
"build:pre"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE npm run apollo && cross-env COS_ENV=production easy build --devtool"
,
"build:test"
:
"cross-env COS_ENV=test easy build --devtool"
,
"tsc"
:
"ets && tsc -p tsconfig.json"
,
"tsc"
:
"ets && tsc -p tsconfig.json"
,
"clean"
:
"ets clean"
,
"clean"
:
"ets clean"
,
"kill"
:
"easy kill"
,
"kill"
:
"easy kill"
,
"lint"
:
"tslint --project . -c tslint.json"
,
"lint"
:
"tslint --project . -c tslint.json"
,
"fix"
:
"tslint --fix --project . -c tslint.json 'app/web/**/*{.ts}'"
,
"fix"
:
"tslint --fix --project . -c tslint.json 'app/web/**/*{.ts}'"
,
"ii"
:
"
npm install --registry https://registry.npm.taobao.org
"
,
"ii"
:
"
rm -rf node_modules && npm install --registry http://npmprivate.quantgroups.com
"
,
"changelog"
:
"conventional-changelog -p angular -i CHANGELOG.md -s"
"changelog"
:
"conventional-changelog -p angular -i CHANGELOG.md -s"
},
},
"dependencies"
:
{
"dependencies"
:
{
...
...
webpack.config.js
View file @
c648bdcc
...
@@ -60,7 +60,8 @@ module.exports = {
...
@@ -60,7 +60,8 @@ module.exports = {
{
{
define
:{
define
:{
'
process.env
'
:
{
'
process.env
'
:
{
SENTRY_ENV
:
JSON
.
stringify
(
process
.
env
.
SENTRY_ENV
)
SENTRY_ENV
:
JSON
.
stringify
(
process
.
env
.
SENTRY_ENV
),
COS_ENV
:
JSON
.
stringify
(
process
.
env
.
COS_ENV
),
}
}
}
}
}
}
...
...
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