[英]Should :name and/or :app be added to project definition in root mix.exs file in umbrella application?
I'm attempting to generate documentation for applications in my Elixir project using ExDoc.我正在尝试使用 ExDoc 为我的 Elixir 项目中的应用程序生成文档。 My project is structured as an umbrella application, with two apps, a functional core and a Phoenix web frontend.
我的项目结构为一个伞形应用程序,有两个应用程序,一个功能核心和一个 Phoenix web 前端。 When running the command
mix docs
from the root of the umbrella, I get the following error message:从伞的根目录运行命令
mix docs
时,我收到以下错误消息:
** (RuntimeError) expected :name or :app to be found in the project definition in mix.exs
(ex_doc 0.23.0) lib/mix/tasks/docs.ex:328: Mix.Tasks.Docs.run/3
(mix 1.11.3) lib/mix/task.ex:394: Mix.Task.run_task/3
(mix 1.11.3) lib/mix/cli.ex:84: Mix.CLI.run_task/2
(elixir 1.11.3) lib/code.ex:931: Code.require_file/2
The root mix.exs file is as follows:根 mix.exs 文件如下:
defmodule UmbrellaProject.MixProject do
use Mix.Project
def project do
[
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
defp deps do
[{:ex_doc, "~> 0.23.0", dev: true, runtime: false}]
end
end
Should I add:name and/or:app values to the list in the project/1
function?我应该在
project/1
function 的列表中添加:name 和/或:app 值吗? If yes, is there a standard convention for what their values should be or can they be anything (within reason)?如果是,是否有标准约定它们的值应该是什么,或者它们可以是什么(在合理范围内)?
I'm using Elixir version 1.11.3.我正在使用 Elixir 版本 1.11.3。
Try to add name: " xxx "
in your config.尝试在您的配置中添加
name: " xxx "
。
defmodule UmbrellaProject.MixProject do
use Mix.Project
def project do
[
name: "My umbrella project",
apps_path: "apps",
version: "0.1.0",
start_permanent: Mix.env() == :prod,
deps: deps()
]
end
defp deps do
[{:ex_doc, "~> 0.23.0", dev: true, runtime: false}]
end
end
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.