Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
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
Commits
945a0099
Commit
945a0099
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
!64
parents
baa5b465
534bbf7a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
8 deletions
+11
-8
index.ts
app/web/config/index.ts
+1
-1
server.js
bin/server.js
+1
-0
package.json
package.json
+7
-6
webpack.config.js
webpack.config.js
+2
-1
No files found.
app/web/config/index.ts
View file @
945a0099
...
@@ -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 @
945a0099
...
@@ -15,6 +15,7 @@ npm.load(() => {
...
@@ -15,6 +15,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
"
);
}
}
});
});
...
...
package.json
View file @
945a0099
...
@@ -3,22 +3,23 @@
...
@@ -3,22 +3,23 @@
"version"
:
"1.0.0"
,
"version"
:
"1.0.0"
,
"description"
:
"低代码平台"
,
"description"
:
"低代码平台"
,
"scripts"
:
{
"scripts"
:
{
"start"
:
"cross-env NODE_ENV=production
APOLLO_CLUSTER=3C
egg-scripts start --port 9050 --workers 1"
,
"start"
:
"cross-env NODE_ENV=production egg-scripts start --port 9050 --workers 1"
,
"start:pre"
:
"cross-env NODE_ENV=production
APOLLO_CLUSTER=3PRE
egg-scripts start --port 9050 --workers 1"
,
"start:pre"
:
"cross-env NODE_ENV=production egg-scripts start --port 9050 --workers 1"
,
"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 --port 7002"
,
"dev"
:
"egg-bin dev -r egg-ts-helper/register --port 7002"
,
"debug"
:
"egg-bin debug -r egg-ts-helper/register"
,
"debug"
:
"egg-bin debug -r egg-ts-helper/register"
,
"apollo"
:
"
cross-env NODE_ENV=production EGG_SERVER_ENV=sit DEBUG=apollo APOLLO_CLUSTER=k8s NAMESPACE=test1
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:pre"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE 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 NODE_ENV=production COS_ENV=production easy build --devtool"
,
"build:pre"
:
"cross-env NODE_ENV=production APOLLO_CLUSTER=3PRE npm run apollo && 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/**/*{.ts}'"
,
"fix"
:
"tslint --fix --project . -c tslint.json 'app/**/*{.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 @
945a0099
...
@@ -73,7 +73,8 @@ module.exports = {
...
@@ -73,7 +73,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