Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Vue 项目转换为 Tenon Vue 项目专项 #12

Open
duanlikang opened this issue Mar 16, 2021 · 2 comments
Open

Vue 项目转换为 Tenon Vue 项目专项 #12

duanlikang opened this issue Mar 16, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@duanlikang
Copy link
Collaborator

专项背景:
现在的 Vue 项目在迁移改造 Tenon Vue 中,没有现成的工具,需要手动的进行迁移改造转换,成本较高,如何快速的进行项目的迁移是现在亟需解决的问题。
分析两个项目的共性,发现基础语法是拉齐的,可以通过工具的方式,将 Vue项目转换生成 Tenon Vue 的标准项目(转换后的代码要求可读,可二次编写)。

备注:此 issure 作为专项的背景和技术方案的探讨,任何问题可以在评论中讨论。

@duanlikang duanlikang added the enhancement New feature or request label Mar 16, 2021
@duanlikang duanlikang pinned this issue Mar 16, 2021
@neu-liruijia
Copy link

neu-liruijia commented Mar 16, 2021

我的思路是: 先不考虑css 和 js,假设css目前是标准的符合 tenon规范,js 大部分应该也是无需修改,剩下的template只需要完成组件替换,还有一个问题是: 组件引入问题,vue使用的组件也需要进行相应的转译操作

@duanlikang
Copy link
Collaborator Author

整体的编译过程应该分为三部分

  1. entry.js 首页,主要是入口文件的转换解析
  2. xx.vue vue 文件,主要是 vue 文件的转换,针对上面讨论的,template 模块进行转换、style模块不做处理、script模块需要进行依赖解析,依次转换其依赖的组件(暂时只考虑 Es6 的静态引入)
  3. 资源文件 主要涉及到 Script 模块或者入口的 js 依赖,需要对齐进行文件的拷贝,统一生成到目标工程中

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants