Tuesday, January 13, 2015

Intellisense for Bower and NPM in Visual Studio 2015


Microsoft has recently launched the Visual Studio 2015 Preview with ASP.NET 5(vNext) and it’s got ton of features. In this blog post we are going to learn about Intellisense feature for Bower and NPM.

What is Bower and NPM:

 

Bower: Bower is a package manager for JavaScript libraries that allow you to define, version and retrieve your dependencies. It works on top of NPM. You can find more about that at following link.

http://bower.io/
https://egghead.io/lessons/bower-introduction-and-setup

NPM: NPM stands for Node Package Manager- It’s a kind of package manager for the installing node.js packages just like NuGet packages.  You can find more information about following location.

https://docs.nodejitsu.com/articles/getting-started/npm/what-is-npm
http://en.wikipedia.org/wiki/Npm_(software)

Bower and NPM Intellisense in Visual Studio 2015:

 

As you know when you create new ASP.NET 5 (vNext) project from visual studio 2015. It contains a new section called dependencies where you can find all the dependencies based on NPM and bower.

dependencies-visual-studio-2015

Both of the package manager are maintained and control by JSON files and that provides a list of dependencies for both.

Bower.json for Bower
config.json for NPM

And here’s how you can edit your bower dependencies with bower.json  and config.json file like below.

intellisense-for-bower

Here you can see that I tried to add Modernizer library with bower. That’s it. Hope you like it. Stay tuned for more.!.
Share:

6 comments:

  1. Does this part of VS 2015 Preview ? I have tried to put attribute on two different assembly but it want compile.

    ReplyDelete
  2. No it will not work but you can have it with latest version of runtime and asp.net vnext from github

    ReplyDelete
  3. Do you have any example created for this ? I have tried to create example by putting same interface in two different namespace but it does not compile in K runtime.

    ReplyDelete
  4. namespaces must be same.

    ReplyDelete

Your feedback is very important to me. Please provide your feedback via putting comments.

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews