cbk-monitor-source-map-parser

0.0.1 • Public • Published

@cbk/monitor-source-map-parser

此库为 node cli 工具库,用于服务端执行子进程 shell,解析出 sourcemap 源码(输出日志中获取)

参数

需提供默认参数 文件名,行号参数 --line ,列号参数 --column

返回值

{
  "source": "",
  "line": 0,
  "column": 0,
  "name": ""
}
  • source {string} 源代码
  • line {number} 行号
  • column {number} 列号
  • name {string} 名称

nodejs 使用示例

const child_process = require('node:child_process');

try {
  const output = child_process.execSync(
    'cbk-source-map-parser /path/to/project-name/version/main.js.map --line 10 --column 10',
    {
      encoding: 'utf-8',
    },
  );

  console.log(output);
} catch (e) {
  console.log(e);
}

Readme

Keywords

none

Package Sidebar

Install

npm i cbk-monitor-source-map-parser

Weekly Downloads

0

Version

0.0.1

License

ISC

Unpacked Size

3.2 kB

Total Files

4

Last publish

Collaborators

  • winme