Bundle Directory Using Visual Studio Web Essentials

Is it possible to link all javascript (or css) files in a directory using Web Essentials? Just like the System.Web.Optimizations package can take a directory?

I tried:

<directories> <directory>/myDirectory</directory> </directories> 

but it does not work.

I need to link all the files in a folder for an AngularJS application, and it's nice not to worry about adding every new file.

I want to use the Web Essentials package so that I can generate source maps.

+6
source share
2 answers

It is not possible for WebEssentials to “look” at the folder for changes and automatically include them, and also cannot use wildcards or directory paths.

https://webessentials.uservoice.com/forums/140520-general/suggestions/4201808-bundling-folders-instead-of-individual-files

It looks like the author has released a new extension for VS2015 that has these features, but if you are using the VS version before that, you're out of luck.

+1
source

Here are some links that explain how to do this:

Mads Christensen explains

Essentials Website Description

Edit: here is a brief explanation. After you have installed Web Essentials, right-click on the folder you want in your bundle, then select the sites from the drop-down list and finally click on the css package. This will create an xml file that describes your bundle, as well as create your package files.

0
source

Source: https://habr.com/ru/post/973736/


All Articles