File tree 3 files changed +29
-5
lines changed
3 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 21
21
"lint" : " eslint --ext=ts ." ,
22
22
"post:generate" : " ./scripts/post-gen/global.sh" ,
23
23
"generate" : " ./scripts/multiplexer.sh ./scripts/generate.sh ${0:-all} ${1:-all} && yarn post:generate" ,
24
- "playground:java" : " mvn clean compile exec:java -f playground/java/pom.xml" ,
25
- "playground:js:analytics" : " yarn workspace javascript-playground start:analytics" ,
26
- "playground:js:personalization" : " yarn workspace javascript-playground start:personalization" ,
27
- "playground:js:recommend" : " yarn workspace javascript-playground start:recommend" ,
28
- "playground:js:search" : " yarn workspace javascript-playground start:search" ,
24
+ "playground" : " ./scripts/multiplexer.sh ./scripts/playground.sh ${0:-javascript} ${1:-search}" ,
29
25
"specs:format" : " yarn prettier --write specs" ,
30
26
"specs:lint" : " eslint --ext=yml specs/ .github/"
31
27
},
Original file line number Diff line number Diff line change @@ -19,6 +19,12 @@ CMD=$1
19
19
LANGUAGE=$2
20
20
CLIENT=$3
21
21
22
+ if [[ $CMD == " ./scripts/playground.sh" ]] && ([[ $LANGUAGE == " all" ]] || [[ $CLIENT == " all" ]]); then
23
+ echo " You cannot use 'all' when running the playground, please specify the language and client"
24
+
25
+ exit 1
26
+ fi
27
+
22
28
LANGUAGES=()
23
29
CLIENTS=()
24
30
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Break on non-zero code
4
+ set -e
5
+
6
+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null && pwd) "
7
+ # Move to the root (easier to locate other scripts)
8
+ cd ${DIR} /..
9
+
10
+ lang=$1
11
+ client=$2
12
+
13
+ # Run the pre generation script if it exists.
14
+ run_playground () {
15
+ if [[ $lang == ' javascript' ]]; then
16
+ yarn workspace javascript-playground start:$client
17
+ elif [[ $lang == ' java' ]]; then
18
+ mvn clean compile exec:java -f playground/java/pom.xml
19
+ fi
20
+ }
21
+
22
+ run_playground
You can’t perform that action at this time.
0 commit comments