File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,12 @@ set -eux
8
8
export TYPE=typescript
9
9
export EXAMPLE=vanilla_webpack
10
10
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
+
11
17
# 1. Create and build example code in temporary directory
12
18
cd $TYPE && bash ./create_$EXAMPLE .sh && cd ..
13
19
@@ -61,8 +67,7 @@ cat > temp.json << EOF
61
67
}
62
68
}
63
69
EOF
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
66
71
rm temp.json
67
72
68
73
# 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
8
8
cd $OUTPUT_DIRECTORY
9
9
rm -rf *
10
10
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
+
11
17
# 1. Create initial package.json (npm project settings)
12
18
npm init --yes
13
19
@@ -85,8 +91,7 @@ cat > temp.json << EOF
85
91
}
86
92
}
87
93
EOF
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
90
95
rm temp.json
91
96
92
97
# 8. Build and run basic example without any BokehJS
You can’t perform that action at this time.
0 commit comments