Visual Studio + grunt - run tasks depending on configuration?

大城市里の小女人 提交于 2019-12-11 02:59:43

问题


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?


回答1:


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.)




回答2:


<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.



来源:https://stackoverflow.com/questions/28706830/visual-studio-grunt-run-tasks-depending-on-configuration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!