What's the difference between pub dependencies and dev_dependencies?

前端 未结 2 970
长发绾君心
长发绾君心 2021-01-08 00:09

What is the difference in dependencies and dev_dependencies in a pubspec.yaml? It seems that when I run pub get the

2条回答
  •  感动是毒
    2021-01-08 00:36

    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 of any dependencies in your project (dependencies or dev_dependencies) are always ignored when you publish to pub.dev.

    See also https://www.dartlang.org/tools/pub/pubspec.html

提交回复
热议问题