I have a basic Asp.Net 5 site which used Gulp.JS tasks to clean, copy and minify CSS and JS files.
When running these tasks in the Task Runner Explorer - all is good and the old scripts are removed, new ones copied and files minified.
I wish to automate these tasks in VS2015 - so when I build the project the following will happen:
- Old scripts are removed using the clean taks
- New scripts are copied over - using the copy task
- CSS and JS are minified using a min taks (will minify CSS and JS by way of calling separate minify tasks for each. (Prod and staging use minified versions and dev uses the normal js and css files).
Now I may be completely off track here but I would have thought that in the project.json file I should be able to call these gulp tasks in the scripts config like so:
"scripts": {
"prebuild": [ "gulp clean" ],
"postbuild": ["gulp copy" , "gulp min" ],
"prepublish": [ "npm install", "bower install"]
}
The clean works perfectly - however the copy and min tasks do not run at all. Any ideas on how I could automate this behaviour please?