I have a DynamicFoldewrBundle :
bundles.Add(new DynamicFolderBundle("userScripts", "*.js", true, new JsMinify()));
So If I run :
http://optimization.localtest.me/files/templates/designs/HelloTreble/userScripts
...It will render all Javascript files bundled and minified in the HelloTreble folder.
OK.
Question :
But how can I add custom ordered bundles to DynamicFolderBundle?
I have tried this :
bundles.Add(new DynamicFolderBundle("userScripts", "*.js",new JsMinify())
.Include("~/Scripts/A.js").Include("~/Scripts/B.js"))
Which does work.
But the output is :
- First : A.JS
- Second : B.js
- Third : [All
HelloTreble's js files , minified]
(In one file of course)
But what I'm really after is :
- First : [All
HelloTreble's js files , minified] - Second : A.js
- Third : B.js
(In one file of course)
You can implement
IBundleOrdererinterface likeand then attach this to your
DynamicFolderBundlelikeYour scripts will be rendered in order
respond.js, thenbootstrap.js, then your scripts inuserScriptsbundle.