I have an ASP.NET solution where I perform some tasks using gulp (e.g. less-compilation). Inside Visual Studio the corresponding gulp-task is bound to the BeforeBuild event, so it is automatically started whenever I build the solution.
I was experimenting with cake for building and packaging the solution. While building the solution works fine using either the DotNetBuild()
or MSBuild()
tasks, the gulp tasks are not executed during the build.
It seems that gulp (and probably also other task runners) are not automatically "integrated" in the build process.
Does cake somehow support invoking gulp during the build?
(Of course, it should ideally also restore gulp itself (using npm / package.json) if it is not available.)
UPDATE: There is now an addin for Cake for running Gulp Tasks. You can find it here
As to why using the MSBuild Alias in Cake is not invoking the BeforeBuild target we are not sure. Could I ask that you raise an issue here so that we can discuss it. Ideally, a sample project that demonstrates the problem could be provided so that we can investigate.
To answer your overall question though...
No, currently, there are no Cake Aliases/Addin's that support running Gulp Tasks as part of the build pipeline. That is not to say that this couldn't be done, simply that it hasn't been on our radar yet.
Having said that, given that you can write any arbitrary C# as part of your build script, there is no reason that you couldn't spawn out a process to invoke gulp with the necessary arguments to do the work.