Since I first saw a dist/ directory in many open source projects, usually on GitHub, I've been wondering what it means. (I'm a foreigner, no native in english)
With dist, vendor, lib, src, and many other folder names that we see quite often, I sometimes wonder how I should name my own folders.
Correct me if I'm wrong!
- src: Contains the *sources**. Sometimes only the pure sources, sometimes with the minified version, depends on the project.
- vendor: Contains other dependencies, like other open source projects.
- lib: Good question, it's really close to
vendoractually, depending on the project we can see one or another or both... - dist: From what I saw, it contains the "production" files, the one we should use if we want to use the library.
Why is open source so confusing? Isn't it possible to do things more clearly? At least per language because some languages use specific names.
Answer to main question...
/dist: "distribution", the compiled code/library.
Folder structure differs for build systems and language. Here are some standard conventions...
src/: "source" files to build and develop the project.dist/: "distribution", the compiled code/library.lib/: external dependencies (when included directly).test/: the project's tests scripts, mocks, etc.vendor/: dependencies are usually put here via dependency management.bin/: files that get added to your PATH when installed.
Files:
README.md: always read this first.LICENSE.md: any rights given to you regarding the project.CONTRIBUTING.md: how to help out with the project.
Specific (these could go on forever):
package.json: describes library and dependencies (if a JS package).composer.json: same as above but for PHP packages via composer..travis.yml: config file for the Travis CI environment.
本文探讨了开源项目中常见文件夹如src、dist、lib、vendor等的意义及使用场景,解析了不同语言和构建系统下的标准文件夹结构,帮助读者理解并规范自己的项目目录。
9032

被折叠的 条评论
为什么被折叠?



