This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree 9 files changed +50
-92
lines changed
9 files changed +50
-92
lines changed Original file line number Diff line number Diff line change 1
1
include Makefile.include.mk
2
2
3
+ json_cli :
4
+ chmod 755 $(JSON_CLI )
5
+
3
6
help :
4
7
$(call serve.help)
5
8
$(call gen.help)
19
22
npm install # for commitizen
20
23
21
24
# shortcut for serve.local
22
- dev :
23
- cp config/config.local.json config/config.json
25
+ dev : json_cli
26
+ $(JSON_CLI ) -s ' .[0] * .[1]' config/config.json config/config.local.json > /tmp/config.json
27
+ cp /tmp/config.json ./config/config.json
24
28
npm run local
25
29
26
30
build :
27
31
npm build
28
32
29
33
build.dev :
30
- cp config/config.dev.json config /config.json
34
+ $( JSON_CLI ) -s ' .[0] * .[1] ' config/config.json config/config. dev.json > /config.json
31
35
npm run build.dev
32
36
33
37
build.prod :
34
- cp config/config.prod.json config /config.json
38
+ $( JSON_CLI ) -s ' .[0] * .[1] ' config/config.json config/config. prod.json > /config.json
35
39
npm run build.prod
36
40
37
41
serve.help :
Original file line number Diff line number Diff line change @@ -27,12 +27,15 @@ GITHUB_APP_LINK = "https://github.com/settings/applications/689577"
27
27
28
28
ifeq ($(OS ) ,Darwin) # Mac OS X
29
29
BROWSER_TOOL = open
30
+ JSON_CLI=./utils/bin/jq-mac
30
31
endif
31
32
ifeq ($(OS ) ,Linux)
32
33
BROWSER_TOOL = google-chrome
34
+ JSON_CLI=./utils/bin/jq-linux
33
35
endif
34
36
ifeq ($(OS ) ,Windows)
35
37
BROWSER_TOOL = explorer
38
+ JSON_CLI=./utils/bin/jq-win
36
39
endif
37
40
38
41
define browse
Original file line number Diff line number Diff line change 1
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"
2
+ "//--- endpoint configs ---//" : " " ,
3
+ "GRAPHQL_ENDPOINT" : " http://localhost:4001/graphiql"
22
4
}
Original file line number Diff line number Diff line change 1
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"
2
+ "//--- endpoint configs ---//" : " " ,
3
+ "GRAPHQL_ENDPOINT" : " https://devapi.coderplanets.com/graphiql"
22
4
}
Original file line number Diff line number Diff line change 1
1
{
2
- "// endpoint configs //" : " -------------------------------- " ,
2
+ "//--- endpoint configs --- //" : " " ,
3
3
"ASSETS_ENDPOINT" : " https://cps-oss.oss-cn-shanghai.aliyuncs.com" ,
4
4
"GRAPHQL_ENDPOINT" : " https://api.coderplanets.com/graphiql" ,
5
- "//GRAPHQL_ENDPOINT" : " http://localhost:4001/graphiql" ,
6
-
7
- "// general configs //" : " --------------------------------" ,
5
+ "//--- general configs ---//" : " " ,
8
6
"DEFAULT_THEME" : " cyan" ,
9
7
"SENIOR_AMOUNT_THRESHOLD" : 51.2 ,
10
8
"SPONSOR_AMOUNT_THRESHOLD" : 3999 ,
14
12
"M" : 30 ,
15
13
"L" : 40
16
14
},
17
-
18
- "// contact configs //" : " --------------------------------" ,
15
+ "//--- contact configs ---//" : " " ,
19
16
"EMAIL_CLUB" : " club@group.coderplanets.com" ,
20
17
"EMAIL_SUPPORT" : " support@group.coderplanets.com" ,
21
18
"EMAIL_HELLO" : " hello@group.coderplanets.com" ,
22
- "EMAIL_BUSINESS" : " business@group.coderplanets.com"
19
+ "EMAIL_BUSINESS" : " business@group.coderplanets.com" ,
20
+ "// GRAPHQL_ENDPOINT" : " http://localhost:4001/graphiql"
23
21
}
Original file line number Diff line number Diff line change 1
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"
2
+ "//--- endpoint configs ---//" : " " ,
3
+ "// GRAPHQL_ENDPOINT" : " http://localhost:4001/graphiql"
23
4
}
Original file line number Diff line number Diff line change 1
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"
2
+ "//--- endpoint configs ---//" : " " ,
3
+ "GRAPHQL_ENDPOINT" : " https://api.coderplanets.com/graphiql"
22
4
}
Original file line number Diff line number Diff line change
1
+ {
2
+ "status" : " 1 status" ,
3
+ "timestamp" : 1382461861 ,
4
+ "value" : {
5
+ "aaa" : {
6
+ "value3" : " v3" ,
7
+ "value4" : 4
8
+ },
9
+ "bbb" : {
10
+ "value3" : " v3"
11
+ }
12
+ }
13
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "status" : " 2 status" ,
3
+ "timestamp" : 1382461861 ,
4
+ "value" : {
5
+ "ccc" : {
6
+ "value3" : " v3" ,
7
+ "value4" : 4
8
+ },
9
+ "ddd" : {
10
+ "value3" : " v3"
11
+ }
12
+ }
13
+ }
You can’t perform that action at this time.
0 commit comments