-
-
Notifications
You must be signed in to change notification settings - Fork 50
Asset Urls
There's a couple of methods you can use retrieve the URLs that Smidge will generate when rendering the <link>
or <script>
html tags. This might be handy in case you need to load in these assets manually (i.e. lazy load scripts, etc...):
Task<IEnumerable<string>> SmidgeHelper.GenerateJsUrlsAsync()
Task<IEnumerable<string>> SmidgeHelper.GenerateCssUrlsAsync()
Both of these methods return a list of strings and there are several overloads for each which allow you to generate the URLs for pre-defined bundles, or the URLs for runtime registered dependencies. Examples of this can be seen in the demo web site's Index.cshtml: https://github.com/Shazwazza/Smidge/blob/master/src/Smidge.Web/Views/Home/Index.cshtml
These methods have overloads and one of the parameters is bool debug
, if you pass in true the methods will return the list of paths for debug modes and if false is passed in the path will be for the non-debug bundle.