dotless:如何使用 dotless.Compiler.exe 处理 LESS 文件列表
我想知道如何使用 exe 二进制文件处理 LESS 文件列表,例如:
./dotless.Compiler.exe -m *.less
现在我只能处理单个文件,但不能处理通配符。
我之所以问这个问题是因为我想在MSBuild中创建一个目标,它是为了处理一个项目集合(这是一个文件列表)。我找不到在 MSBuild 中循环任务的方法。如果有人知道如何为每个文件循环一个任务,那也可以解决我的问题。
I wanted to know how to process a list of LESS files using the exe binaries, for example:
./dotless.Compiler.exe -m *.less
Right now I only can do individual files, but can't do wildcard.
The reason why I asked about this is that I want to create a target in MSBuild, which is to process an item collection (which is a list of files). I couldn't find a way to loop a task in side MSBuild. If anyone knows how to loop a task for each file, that would solve my problem too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用
ItemGroup
获取文件列表,如下所示:使用
%(MyFiles.FullPath)
语法(也称为 任务批处理)Use an
ItemGroup
to get a list of files like this:Call the compiler once for each file by using
%(MyFiles.FullPath)
syntax (also known as Task Batching)