pub依赖和dev_dependencies之间有什么区别? [英] What's the difference between pub dependencies and dev_dependencies?
问题描述
pubspec.yaml中的
?看来当我运行依赖项
和 dev_dependencies
有什么区别 pub get
时,没有下载 dev_dependencies
。
What is the difference in dependencies
and dev_dependencies
in a pubspec.yaml
? It seems that when I run pub get
the dev_dependencies
aren't downloaded.
推荐答案
dev_dependencies
是依赖关系,这些依赖关系不适用于结果应用程序中的代码,而仅适用于测试,示例,工具,或将可执行的工具(例如用于代码生成的工具)添加到项目中。
dev_dependencies
are dependencies that are not available for code in the resulting application, but only for tests, examples, tools, or to add executable tools like for code generation to your project.
dev_dependencies
项目中任何依赖项(<$ c在发布到pub.dev时,始终会忽略$ c> dependencies 或 dev_dependencies
)。
dev_dependencies
of any dependencies in your project (dependencies
or dev_dependencies
) are always ignored when you publish to pub.dev.
请参见还 https://www.dartlang.org/tools/pub/pubspec.html
这篇关于pub依赖和dev_dependencies之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!