Running Script in an assembly (e.g. Gulp or Grunt)

I have a project.json script for 'prepare' that runs a gulpfile file to push my toy into wwwroot. It works fine, except that during dev, I have to start it manually after updating the bower.json package. Any way to automate this during dev? I usually use a post-build script, but they are not visible. My project.json scripts look like this:

  "scripts": {
    "prepare": [ "gulp bower" ]
  }

What I like:

  "scripts": {
    "post-build": [ "gulp bower" ]
  }
+4
source share
2 answers

You can use Task Runner Explorerto automate this. (Use Quick Launchin the upper right corner, Ctrl+ Alt+ \, or ViewOther WindowsTask Runner Explorer.)

, (bower prepare, , ), , .

gruntfile.js, , :

/// <binding BeforeBuild='beforeBuild' AfterBuild='afterBuildMinimal' ProjectOpened='watch' />

, gulpfile.js , Task Runner Explorer - , !

+5

postrestore postbuild project.json.

:

"postrestore": [ "npm install", "bower install" ]
"postbuild": [ "brunch build" ]

, ,

"postbuild": [ "gulp bower" ]
+1

All Articles