.net - Executing Gulp task(s) only when publishing ASP.NET 5 web application -


what best way execute gulp tasks when publishing asp.net 5 web application? need add custom build event executes gulp command?

cmd.exe /c gulp -b "c:\projects\projectname\source\projectname.web" --gulpfile "c:\projects\projectname\source\projectname.web\gulpfile.js" publish 

or, preferably, there way bind gulp task beforepublish target via task runner explorer?

any suggestions appreciated.

update 2 .net core cli doesn't support "prepack" more. "postcompile" script may work better.

https://docs.microsoft.com/en-us/dotnet/articles/core/tools/project-json#scripts

original answer

add "scripts" section of project.json

project.json: scripts documentation

{ ...   "scripts": {     "prepack": "gulp publish",   } ... } 

Comments

Popular posts from this blog

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -