在cordova中设置全局配置文件的路径?

Set the path to the global configuration file in cordova?

我正在尝试 运行 我的 cordova 项目。 我真正想要什么? 我想通过命令提示符设置 config.xml 的路径。 我试过这样做:

$ cordova run ios --target='iPhone-6' --buildConfig=./app/config.dist.xml

但它告诉我

Error: Current working directory is not a Cordova-based project. 如果我在当前工作目录中创建 config.xml 并在没有任何参数的情况下创建 运行 项目,一切都很好。 那么,是否可以将配置文件放在另一个文件夹中?

根据官方 Cordova documentation,config.xml 可以存在于项目根文件夹或 project_ root/www 文件夹中。

此外,据我所知,文件的命名约定应为 config.xml,以便使用 Cordova CLI 构建相同的文件。此外,cordova create 命令为您设置基本的项目结构,包括 config.xml。建议坚持使用此结构而不是自定义位置以避免错误。