pub依赖和dev_dependencies之间有什么区别? [英] What's the difference between pub dependencies and dev_dependencies?

查看:171
本文介绍了pub依赖和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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆