@sugarat/source-map-cli
v0.1.1
Published
CLI for source-map tool,simple but powerful
Downloads
4
Maintainers
Readme
@sugarat/source-map-cli
CLI for source-map tool,simple but powerful
Quick Started
npm i -g @sugarat/source-map-cli
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js:24:17596
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js -l 24 -c 17596
smt sources https://script.sugarat.top/js/tests/index.9bb0da5c.js
Parse Examples
parse js error file
Usage: smt parse|p [options] <sourceUrl>
parse error form url source
Options:
-s, --source-map set url source as sourceMap type
-l, --line <number> set line number
-c, --column <number> set column number
-o, --output [string] set log output dir
-n, --show-num <number> set show error source lines (default: "5")
parse http source
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js:24:17596
# or
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js -l 24 -c 17596
parse local file
smt parse /Users/sugar/tests/index.9bb0da5c.js -l 24 -c 17596
parse source-map file
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js.map:24:17596 -s
also can out put file
smt parse https://script.sugarat.top/js/tests/index.9bb0da5c.js:24:17596 -o ./
Sources Examples
generate sources
Usage: bin sources|s [options] <sourceUrl>
generating source files by source-map
Options:
-s, --source-map set url source as sourceMap type
-o, --output [string] set files output dir
smt sources https://script.sugarat.top/js/tests/index.9bb0da5c.js
AS Lib
import { getErrorSourceResult } from '@sugarat/source-map-cli'
const result = getErrorSourceResult(url,line,column)
more function see src/util/index.ts