【问题标题】:All Parent-Child relationships Vue Components所有父子关系 Vue 组件
【发布时间】:2019-11-22 00:09:10
【问题描述】:

如何获取项目中所有Vue组件的父子关系? 无论是命令行还是 console.log 都可以。

期望的输出:

├── rootpage
│   ├── componentA
│   │   ├── componentD
│   │   ├── componentF
│   ├── componentB
│   │   ├── componentD
│   │   ├── componentG

【问题讨论】:

    标签: vue.js vue-component


    【解决方案1】:

    您必须使用其中一个 JS 解析器来执行此操作。您可能还必须将其与 vue-loader 集成以提取脚本块。

    https://esprima.org/

    https://github.com/acornjs/acorn

    【讨论】:

    • 听起来很难。
    • 是的,编写解析器很难。 @米拉
    猜你喜欢
    • 1970-01-01
    • 2018-05-13
    • 2017-12-20
    • 1970-01-01
    • 2018-07-03
    • 1970-01-01
    • 2015-04-18
    • 2017-07-12
    • 2019-10-30
    相关资源
    最近更新 更多