简体   繁体   中英

asp.net mvc Bundle.IncludeDirectory example?

Hi Can anyone give me an example on how to use Scriptbundle method IncludeDirectory for Javascripts, not able to get how to write the search pattern string , Is it regex?

bundles.Add(new ScriptBundle("~/bundles/customjs").IncludeDirectory(
                "~/Scripts/Custom",?);

You can write like this:

bundles.Add(new ScriptBundle("~/bundles/customjs").IncludeDirectory(
                "~/Scripts/Custom","*.js"));

If you want for example javascript.

You can read more here: http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM