Azure 未使用 bowerrc 更改组件的安装目录

Azure is not using bowerrc to change install directory for components

我正在通过 bitbucket 将 .NET 应用程序部署到 Azure。 该项目包含一些 bower 依赖项,因此我使用 custom 部署脚本来管理它。

使用下面的代码效果很好。

echo Install bower packages

IF EXIST "%DEPLOYMENT_TARGET%\bower.json" (
  pushd "%DEPLOYMENT_TARGET%"

  ::remove existing components
  call rm -rf bower_components      
  call bower install

  IF !ERRORLEVEL! NEQ 0 goto error
  popd
)
)

但是,我想将组件安装在不同的文件夹中。 因此我添加了一个 .bowerrc 文件并在那里指定了新位置:

{
  "directory": "Client/bower_components/"
}

但 Azure 继续将依赖项安装到默认的 bower_components 文件夹中。

bower.json.bowerrc 都在项目的根目录中。我想将 Bower 依赖项安装到下一级,在 Client 文件夹中。

我怎样才能做到这一点? 为什么 Azure 不使用 .bowerrc 文件?

Note: this works as expected locally. I.e. running bower install, installs the components in the directory specified in .bowerrc

我在 Twitter 上发帖求助,Azure 支持人员在几分钟内做出回应。一星期后,问题已经解决。