sheetjs-clone/packages/s/misc/make_mjs.sh

9 lines
191 B
Bash
Raw Permalink Normal View History

2019-09-04 06:26:56 +00:00
#!/bin/bash
rm -rf dist/mjs/
cp -r dist/esm dist/mjs
find dist/mjs -name '*.js' | while read x; do
<"$x" awk '/(im|ex)port / { gsub(/";/, ".mjs\";"); } 1' > "${x%.js}.mjs"
rm -f "$x"
done