0.0.2 • Published 3 years ago

func-line-cli v0.0.2

Weekly downloads
3
License
ISC
Repository
-
Last release
3 years ago

func-line-cli

获取函数所在行号的命令行工具

使用方法

1、安装包

npm install func-line-cli

2、命令行中使用

func-line ./src/utils

其中.src/utils表示要遍历的目录

输出

输出一个文件funcLineMap.json,内容格式为:

{
  "city-getAreaDataAll": "./src/utils/city/index.js#L3",
  "city-getAreaData": "./src/utils/city/index.js#L17",
  "city-getAreaCode": "./src/utils/city/index.js#L65",
  "city-getAreaName": "./src/utils/city/index.js#L92"
}

每一行的含义为:${文件名}-${函数名}: ${文件路径}#L${行号}

搭配使用

v-func-line

Demo文档

点击这里可以查看插件效果