Visual Studio + grunt - run tasks depending on con

2019-07-21 03:50发布

I've just start playing with grunt for visual studio and I can't figure out how to run particular tasks depending on configuration (debug, release, etc).

You can run tasks before build, after build, etc. But how to bind it to the configuration?

2条回答
贪生不怕死
2楼-- · 2019-07-21 04:28

This Question might help.

On top of that I added this:

cd "$(SolutionDir)\CustomerService\Resources\build\node_modules"
call grunt.cmd chatStyling --buildConfiguration=$(ConfigurationName)

to my pre-build events. (Note that chatStyling is a custom task.)

查看更多
成全新的幸福
3楼-- · 2019-07-21 04:34

<shameless-plug /> I do this using VsCommandBuddy extension for vs2013/vs2015. Using the configurationname in a macro as parameter for the command you'd like to execute.

查看更多
登录 后发表回答