Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio javaScript default directory with NuGet

I need some help with organizing js files in VS.

So my problem is, that VS(MVC) put all js files by default into the script directory, but i also have js created by me, in a sub directory, like this:
enter image description here

Now my problem is that when i open the scripts folder, the js files installed by NuGet take 2-3 screens in length, so i either have to open/close it every time, or scroll trought like there is no tomorrow.

So my question is, is there any good solutions to it? Like moving all the files into a subdirectory, and change every bundles, and NuGet config, or should i create a separate script directory for my custom js files? Any good ideas?

like image 346
MrKekson Avatar asked Oct 31 '22 11:10

MrKekson


2 Answers

You can place and use as many subdirectories you wish for your own scripts.

With the help of Bundle.IncludeDirectory all your scripts will be added to the bundle without having to define multiple bundles.

Concerning nuget I don't think you can (re)place those scripts at a location of your choice.

See Stackoverflow: Include all files in a folder in a single bundle

like image 152
Tom B. Avatar answered Nov 12 '22 18:11

Tom B.


Sadly you cannot change the default folder that NuGet downloads the files. Is the author of the NuGet package that decides where it will get installed.

An alternative is to use Bower. With it you can control where files get downloaded (look at this question).

Or, as you said, move your own javascripts to another folder and forget about the default.

like image 21
fabriciorissetto Avatar answered Nov 12 '22 19:11

fabriciorissetto