.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

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

php - How do you embed a video into a custom theme on WordPress? -