VS2015NodeScript
Demonstrates how integrated node, gulp, npm and bower are with a DNX/.Net45/ASPNet5 project in Visual Studio 2015.
- Start Visual Studio 2015
- File=>New Project - ctrl+shift+n
- Select
Visual C#/Windows/ASP.Net Web Application
- OK
- In the
ASP.Net 5 Preview Templates
group, selectWeb
- Point out bower.json and package.json (bower/npm respectively)
- Open the Dependencies node and show the Bower/NPM dependencies
- Drop to a command prompt
- CD to the project directory
- Issue
dnu publish
- Point out the npm, bower, gulp steps
- Go back to Visual Studio
- Open Task Runner Explorer
- Show how gulp tasks can be bound to different Visual Studio events. Right click on a task and choose the binding
- Rebuild - ctrl+shift+b - to see the task being run
Bonus points
Website can be run with dnx . web
Build 2015:
Scott Hunter: You may ask why are we bring bower into visual studio, when we have nuget already Scott Hanselman: Because the whole world uses it