Search code examples
asp.net-core.net-coresmidge

Can I include scripts and styles into Smidge bundler by wild card?


And if so, how? :) I tried doing simply for example

"~/scripts/src/*.js"

but no luck. It would save me quite a lot of work if I could do that, or even

"~/scripts/src/**/*.js"

Solution

  • You can but it doesn't currently support the correct/nice globbing patterns that you describe. For example, you can include a folder with a filter with this syntax: @{ Smidge.RequiresJs("~/Js/Stuff*js"); } ... so include the Stuff folder for *.js files (see https://github.com/Shazwazza/Smidge/wiki/declarations#view-based-declarations)

    This is the task that needs to be completed to make this work nicely https://github.com/Shazwazza/Smidge/issues/47 Hopefully i can find some time to get that done soon.