This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 12 files changed +129
-47
lines changed Expand file tree Collapse file tree 12 files changed +129
-47
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ before_script:
31
31
script :
32
32
# - codecov
33
33
- rm -rf .next
34
+ - cp config/config.ci.json config/config.json
34
35
- nvm exec 10.12.0 npm run build.ci
35
36
- nvm exec 10.12.0 npm run test:ci
36
37
Original file line number Diff line number Diff line change 20
20
21
21
# shortcut for serve.local
22
22
dev :
23
+ cp config/config.local.json config/config.json
23
24
npm run local
24
25
25
26
build :
26
27
npm build
27
28
28
29
build.dev :
30
+ cp config/config.dev.json config/config.json
29
31
npm run build.dev
30
32
31
33
build.prod :
34
+ cp config/config.prod.json config/config.json
32
35
npm run build.prod
33
36
34
37
serve.help :
Original file line number Diff line number Diff line change 1
- export const ASSETS_ENDPOINT = 'https://cps-oss.oss-cn-shanghai.aliyuncs.com'
1
+ import * as CONFIG from './config.json'
2
+
3
+ export const { ASSETS_ENDPOINT } = CONFIG
2
4
// process.env.ALI_OSS_ADDR
3
5
// export const ASSETS_ENDPOINT = 'https://coderplanets.oss-cn-beijing.aliyuncs.com'
4
6
Original file line number Diff line number Diff line change
1
+ {
2
+ "// endpoint configs //" : " --------------------------------" ,
3
+ "ASSETS_ENDPOINT" : " https://cps-oss.oss-cn-shanghai.aliyuncs.com" ,
4
+ "GRAPHQL_ENDPOINT" : " http://localhost:4001/graphiql" ,
5
+
6
+ "// general configs //" : " --------------------------------" ,
7
+ "DEFAULT_THEME" : " cyan" ,
8
+ "SENIOR_AMOUNT_THRESHOLD" : 51.2 ,
9
+ "SPONSOR_AMOUNT_THRESHOLD" : 3999 ,
10
+ "PAGE_SIZE" : {
11
+ "S" : 10 ,
12
+ "D" : 20 ,
13
+ "M" : 30 ,
14
+ "L" : 40
15
+ },
16
+
17
+ "// contact configs //" : " --------------------------------" ,
18
+ "EMAIL_CLUB" : " club@group.coderplanets.com" ,
19
+ "EMAIL_SUPPORT" : " support@group.coderplanets.com" ,
20
+ "EMAIL_HELLO" : " hello@group.coderplanets.com" ,
21
+ "EMAIL_BUSINESS" : " business@group.coderplanets.com"
22
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "// endpoint configs //" : " --------------------------------" ,
3
+ "ASSETS_ENDPOINT" : " https://cps-oss.oss-cn-shanghai.aliyuncs.com" ,
4
+ "GRAPHQL_ENDPOINT" : " https://devapi.coderplanets.com/graphiql" ,
5
+
6
+ "// general configs //" : " --------------------------------" ,
7
+ "DEFAULT_THEME" : " cyan" ,
8
+ "SENIOR_AMOUNT_THRESHOLD" : 51.2 ,
9
+ "SPONSOR_AMOUNT_THRESHOLD" : 3999 ,
10
+ "PAGE_SIZE" : {
11
+ "S" : 10 ,
12
+ "D" : 20 ,
13
+ "M" : 30 ,
14
+ "L" : 40
15
+ },
16
+
17
+ "// contact configs //" : " --------------------------------" ,
18
+ "EMAIL_CLUB" : " club@group.coderplanets.com" ,
19
+ "EMAIL_SUPPORT" : " support@group.coderplanets.com" ,
20
+ "EMAIL_HELLO" : " hello@group.coderplanets.com" ,
21
+ "EMAIL_BUSINESS" : " business@group.coderplanets.com"
22
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "// endpoint configs //" : " --------------------------------" ,
3
+ "ASSETS_ENDPOINT" : " https://cps-oss.oss-cn-shanghai.aliyuncs.com" ,
4
+ "GRAPHQL_ENDPOINT" : " https://api.coderplanets.com/graphiql" ,
5
+ "//GRAPHQL_ENDPOINT" : " http://localhost:4001/graphiql" ,
6
+
7
+ "// general configs //" : " --------------------------------" ,
8
+ "DEFAULT_THEME" : " cyan" ,
9
+ "SENIOR_AMOUNT_THRESHOLD" : 51.2 ,
10
+ "SPONSOR_AMOUNT_THRESHOLD" : 3999 ,
11
+ "PAGE_SIZE" : {
12
+ "S" : 10 ,
13
+ "D" : 20 ,
14
+ "M" : 30 ,
15
+ "L" : 40
16
+ },
17
+
18
+ "// contact configs //" : " --------------------------------" ,
19
+ "EMAIL_CLUB" : " club@group.coderplanets.com" ,
20
+ "EMAIL_SUPPORT" : " support@group.coderplanets.com" ,
21
+ "EMAIL_HELLO" : " hello@group.coderplanets.com" ,
22
+ "EMAIL_BUSINESS" : " business@group.coderplanets.com"
23
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "// endpoint configs //" : " --------------------------------" ,
3
+ "ASSETS_ENDPOINT" : " https://cps-oss.oss-cn-shanghai.aliyuncs.com" ,
4
+ "GRAPHQL_ENDPOINT" : " https://api.coderplanets.com/graphiql" ,
5
+ "//GRAPHQL_ENDPOINT" : " http://localhost:4001/graphiql" ,
6
+
7
+ "// general configs //" : " --------------------------------" ,
8
+ "DEFAULT_THEME" : " cyan" ,
9
+ "SENIOR_AMOUNT_THRESHOLD" : 51.2 ,
10
+ "SPONSOR_AMOUNT_THRESHOLD" : 3999 ,
11
+ "PAGE_SIZE" : {
12
+ "S" : 10 ,
13
+ "D" : 20 ,
14
+ "M" : 30 ,
15
+ "L" : 40
16
+ },
17
+
18
+ "// contact configs //" : " --------------------------------" ,
19
+ "EMAIL_CLUB" : " club@group.coderplanets.com" ,
20
+ "EMAIL_SUPPORT" : " support@group.coderplanets.com" ,
21
+ "EMAIL_HELLO" : " hello@group.coderplanets.com" ,
22
+ "EMAIL_BUSINESS" : " business@group.coderplanets.com"
23
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "// endpoint configs //" : " --------------------------------" ,
3
+ "ASSETS_ENDPOINT" : " https://cps-oss.oss-cn-shanghai.aliyuncs.com" ,
4
+ "GRAPHQL_ENDPOINT" : " https://api.coderplanets.com/graphiql" ,
5
+
6
+ "// general configs //" : " --------------------------------" ,
7
+ "DEFAULT_THEME" : " cyan" ,
8
+ "SENIOR_AMOUNT_THRESHOLD" : 51.2 ,
9
+ "SPONSOR_AMOUNT_THRESHOLD" : 3999 ,
10
+ "PAGE_SIZE" : {
11
+ "S" : 10 ,
12
+ "D" : 20 ,
13
+ "M" : 30 ,
14
+ "L" : 40
15
+ },
16
+
17
+ "// contact configs //" : " --------------------------------" ,
18
+ "EMAIL_CLUB" : " club@group.coderplanets.com" ,
19
+ "EMAIL_SUPPORT" : " support@group.coderplanets.com" ,
20
+ "EMAIL_HELLO" : " hello@group.coderplanets.com" ,
21
+ "EMAIL_BUSINESS" : " business@group.coderplanets.com"
22
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
/* config for different envs */
2
2
import { ICON_CMD } from './assets'
3
+ import * as CONFIG from './config.json'
3
4
4
- const getGraphQLEndpoint = ( ) => {
5
- switch ( process . env . NODE_ENV ) {
6
- case 'production' :
7
- return 'https://api.coderplanets.com/graphiql'
8
-
9
- case 'dev' :
10
- return 'https://devapi.coderplanets.com/graphiql'
11
-
12
- case 'ci' :
13
- return 'http://localhost:4001/graphiql'
14
-
15
- default :
16
- return 'https://api.coderplanets.com/graphiql'
17
- /* return 'http://localhost:4001/graphiql' */
18
- }
19
- }
20
-
21
- export const GRAPHQL_ENDPOINT = getGraphQLEndpoint ( )
5
+ export const { GRAPHQL_ENDPOINT } = CONFIG // getGraphQLEndpoint()
22
6
23
7
export const SITE_URL = 'https://coderplanets.com'
24
8
export const GITHUB_WEB_ADDR =
You can’t perform that action at this time.
0 commit comments