Dem0n13 Dem0n13 - 1 year ago 119
Javascript Question

Managing 3rd party JavaScript libraries in WebStorm under source control

I am a newbie in WebStorm. I created a TypeScript project (empty project with enabled TypeScript transpiler) and added

with links to my scripts.

I want to add 3rd party JavaScript libraries with TypeScript declaration files (jQuery, Knockout, Snap.svg, etc), but with next requirements:

  1. I don't want to add js libraries to my source control.

  2. I want to have my sources in the maximum "compilable" state (minimum manipulation after git checkout).

  3. Local sources (in project/external or project/libraries folder) - not all libraries have CDN.

In my fantasy it's works like a Nuget works with dll packages in Visual Studio.

Answer Source

You could use bower or npm.

They are package managers and you can use it regardless of your IDE. Adding and removing a third party library is dead easy by adding/removing a line in bower.json/package.json for bower/npm respectively.

Here's two links which could help you to learn bower.