Skip to content

Commit f39f1f5

Browse files
updated data extractors
1 parent 3a18652 commit f39f1f5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

bin/update_data.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ SCRIPT_DIR=$(dirname "$(greadlink -f "${BASH_SOURCE[0]}")")
44
ROOT_DIR=$(dirname "$SCRIPT_DIR")
55
SRC_DIR="${ROOT_DIR}/src"
66
DATA_DIR="${SRC_DIR}/data"
7+
TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}'
78

89
function echo_and_eval() {
910
echo "$@"
1011
eval "$@"
1112
}
1213

1314
# get google spreadsheet csv files
14-
echo_and_eval "(cd ${SRC_DIR} && ts-node get_csv_files.ts)"
15+
echo_and_eval "(cd ${SRC_DIR} && \
16+
ts-node -O ${TS_NODE_COMPILER_OPTIONS} get_csv_files.ts)"
1517

1618
# normalize csv files
1719
for x in "${DATA_DIR}"/*.csv; do
@@ -30,4 +32,5 @@ echo_and_eval "python3 ${ROOT_DIR}/py/concat_csv_files.py ${HOTLINES} \
3032
> ${DATA_DIR}/all.csv"
3133

3234
# convert csv files to json
33-
echo_and_eval "(cd ${SRC_DIR} && ts-node make_json_files.ts)"
35+
echo_and_eval "(cd ${SRC_DIR} && \
36+
ts-node -O ${TS_NODE_COMPILER_OPTIONS} make_json_files.ts)"

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dom.iterable",
1212
"esnext"
1313
],
14-
"module": "commonjs",
14+
"module": "esnext",
1515
"moduleResolution": "node",
1616
"resolveJsonModule": true,
1717
"skipLibCheck": true,

0 commit comments

Comments
 (0)