【发布时间】:2019-07-10 14:04:16
【问题描述】:
我的项目中有两个 scss 文件需要在我的 CI 构建期间进行编译(在 Azure Pipelines 上)。当我在本地构建时,一个正在编译,一个没有。我正在使用 WebCompiler,日志的输出显示了一个正在工作的文件,但没有显示丢失文件的任何错误。我的 CI 构建由 Devops 套件中的 Azure Pipelines 处理,由于某种原因,CI 构建的工作方式与本地构建不同。
最初我缺少未编译文件的 BuildAction 上的“内容”标识。我已经更正了,但它仍然没有被编译。我已经确认了 compilerconfig.json 文件的内容,并且两个文件都在那里。
这里是compilerconfig.json
[
{
"outputFile": "Content/custom-bootstrap.css",
"inputFile": "Content/custom-bootstrap.scss"
},
{
"outputFile": "Content/Site.css",
"inputFile": "Content/Site.scss"
}
]
这是来自 CI 构建日志文件的 sn-p(源自 Azure Pipelines)。
WebCompile:
WebCompiler: Begin compiling compilerconfig.json
WebCompiler installing updated versions of the compilers...
Compiled Content/custom-bootstrap.css
Minified Content/custom-bootstrap.min.css
WebCompiler: Done compiling compilerconfig.json
这是来自本地构建日志的 sn-p。
5> WebCompiler: Begin compiling compilerconfig.json
5> Compiled Content/custom-bootstrap.css
5> Minified Content/custom-bootstrap.min.css
5> Compiled Content/Site.css
5> Minified Content/Site.min.css
5> WebCompiler: Done compiling compilerconfig.json
任何帮助将不胜感激。
【问题讨论】:
-
我编辑了这个问题,以更好地说明 CI 构建的行为与本地构建不同 - 并且 CI 构建由 Azure Devops(管道)处理。
标签: css sass azure-devops continuous-integration web-compiler