File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ set -eux
88export TYPE=typescript
99export EXAMPLE=vanilla_webpack
1010
11+ function merge-json() {
12+ # merge the second json file into the first.
13+ TEMP_FILE=$( mktemp)
14+ jq ' . * input' $1 $2 > TEMP_FILE && mv TEMP_FILE $1
15+ }
16+
1117# 1. Create and build example code in temporary directory
1218cd $TYPE && bash ./create_$EXAMPLE .sh && cd ..
1319
@@ -61,8 +67,7 @@ cat > temp.json << EOF
6167 }
6268}
6369EOF
64- npm install --save-dev json-merger
65- npx json-merger --output package.json --pretty package.json temp.json
70+ merge-json package.json temp.json
6671rm temp.json
6772
6873# 5. Copy tests into temp example directory
Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ mkdir -p $OUTPUT_DIRECTORY
88cd $OUTPUT_DIRECTORY
99rm -rf *
1010
11+ function merge-json() {
12+ # merge the second json file into the first.
13+ TEMP_FILE=$( mktemp)
14+ jq ' . * input' $1 $2 > TEMP_FILE && mv TEMP_FILE $1
15+ }
16+
1117# 1. Create initial package.json (npm project settings)
1218npm init --yes
1319
@@ -85,8 +91,7 @@ cat > temp.json << EOF
8591 }
8692}
8793EOF
88- npm install --save-dev json-merger
89- npx json-merger --output package.json --pretty package.json temp.json
94+ merge-json package.json temp.json
9095rm temp.json
9196
9297# 8. Build and run basic example without any BokehJS
You can’t perform that action at this time.
0 commit comments