xsheetjs/misc/strip_sourcemap.sh
SheetJS d02650055d version bump 0.11.4: BIFF8 XLS write
- xlsx bin script takes `-8, --xls` options for writing BIFF8
- updated CFB to 0.12.1, CRC32 to 1.1.1
- test file spelling error (h/t @jsoref)
- minified script renames write_shift / read_shift
- UTF8 and XML entity processing

Issues:
- fixes #815 h/t @Neroth
- fixes #739 h/t @LittleBreak @PWDream
- fixes #553 h/t @keyiis
- fixes #492 h/t @FlyingSailor @simonchan2013
2017-09-22 18:18:51 -04:00

14 lines
444 B
Bash
Executable File

#!/bin/bash
# strip_sourcemap.sh -- strip sourcemaps from a JS file (missing from uglifyjs)
# Copyright (C) 2014-present SheetJS
# note: this version also renames write_shift / read_shift to _W / _R
if [ $# -gt 0 ]; then
if [ -e "$1" ]; then
sed -i.sheetjs '/sourceMappingURL/d' "$1"
sed -i.sheetjs 's/write_shift/_W/g; s/read_shift/_R/g' "$1"
fi
else
cat - | sed '/sourceMappingURL/d' | sed 's/write_shift/_W/g; s/read_shift/_R/g'
fi