【问题标题】:How to copy specific files to the publish directory in post-publish event如何在发布后事件中将特定文件复制到发布目录
【发布时间】:2016-07-29 01:01:51
【问题描述】:

我正在使用 dot net core 进行发布,我注意到 wwroot 中包含的所有文件都被复制到了输出文件夹中,在我的预发布脚本中,我运行了连接、缩小和 uncss 的任务,作为输出,我得到了一个文件,所以我不需要复制整个 wwwroot/css 目录,而我只想复制包含该文件的 wwwroot/css/min。

这是发布 json 结构在 project.json 中的样子:

"scripts": {
    "prepublish": [ "npm install", "bower install", "gulp clean", "gulp min:js", "gulp build" ],
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }

有什么想法吗?

【问题讨论】:

    标签: asp.net-core asp.net-core-mvc asp.net-core-cli


    【解决方案1】:

    有关 project.json 文件的详细信息,请参阅 https://github.com/aspnet/Home/wiki/Project.json-file 中的 publishExclude

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多