使用 Visual Studio 工具为 Apache Cordova 预构建任务

Pre Build Tasks with Visual Studio Tools for Apache Cordova

我正在使用 bower.json 为从 Visual Studio 创建的 Apache Cordova 应用程序安装依赖项,想知道是否可以 运行 在 VS 2015 中以某种方式使用新任务 运行ner explorer(或其他方式)仅将缩小的文件从 bower_components 复制到 www\scripts,或者如果我唯一的选择是 here 列出的内容?

如果可以使用 gulp,请告诉我如何从空白的 Cordova 应用程序 VS 模板开始。

using NuGet with Cordova projects 的 Visual Studio 指南实际上在这方面可能有所帮助。该文档包含有关如何设置 before_prepare 挂钩以在构建时将 NuGet 文件复制到 www 文件夹的注释。在 Cordova 中,before_prepare 是构建过程中的一个挂钩,类似于预构建任务。