We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web前端目录中的 lib 和 vendor 到底有啥区别?
lib
vendor
先来看看定义:
从这个层面上来看,vendor应该是lib的一个子集。
于是,第一种目录关系出现了,即:
|- lib |- plugin |- util |- ... |- vendor |- jquery/ |- boostrap/
以上目录结构也没有错,但是总感觉有些不妥,哪里不妥呢?
就是自己项目的函数库和第三方的混到一起,使得有以下问题:
鉴于以上分析,有人提出了这样的概念:
于是,第二种目录关系出现了,即:
这种目录结构是,lib 和 vendor 是同级的。
经过仔细分析和实际项目使用,个人觉得第二种方案更适合项目规范和开发流程,我们目前就采用第二种方案。
The text was updated successfully, but these errors were encountered:
sunmaobin
No branches or pull requests
web前端目录中的
lib
和vendor
到底有啥区别?讨论
先来看看定义:
从这个层面上来看,vendor应该是lib的一个子集。
于是,第一种目录关系出现了,即:
以上目录结构也没有错,但是总感觉有些不妥,哪里不妥呢?
就是自己项目的函数库和第三方的混到一起,使得有以下问题:
鉴于以上分析,有人提出了这样的概念:
于是,第二种目录关系出现了,即:
这种目录结构是,lib 和 vendor 是同级的。
结论
经过仔细分析和实际项目使用,个人觉得第二种方案更适合项目规范和开发流程,我们目前就采用第二种方案。
参考
The text was updated successfully, but these errors were encountered: