Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mark 122 posts 255 karma points
    Jul 10, 2015 @ 16:29
    Mark
    0

    Creating ClientDependency bundles, where do I create them?

    Seems like a simple thing, and I'm hoping it's possible within Umbraco (I can't see why not).

    In what event do I create ClientDependency (https://github.com/Shazwazza/ClientDependency/wiki) bundles.

    On a standard .net site, it would be under Application_Start, no joy there as I believe Umbraco just uses its' own OnApplicationStarting/OnApplicationInitialized/OnApplicationStarted events.

    I have tried within each of these, but I get nothing rendering when I call

    @{Html.RequiresCssBundle("MyControl");}
    

    Has someone else done this, what could I be missing?

    Thanks in advance..

    Mark

  • Mike Chambers 635 posts 1252 karma points c-trib
    Jul 10, 2015 @ 19:22
    Mike Chambers
    0

    Perhaps this might be useful?

    https://our.umbraco.org/projects/developer-tools/optimus/

    or

    (https://our.umbraco.org/projects/developer-tools/optimus-lite/)

  • Mark 122 posts 255 karma points
    Jul 13, 2015 @ 08:08
    Mark
    0

    Hi Mike,

    Is this something you have used before? I have always used ClientDependency, but not had the requirement for bundles within it as yet. Does this mean it's not possible to use the ClientDependency bundles within Umbraco, or is it just a case of you know Optimus can?

    Thanks for the link, I might well go with that if I know the ClientDependency just won't do what I want.

  • Mike Chambers 635 posts 1252 karma points c-trib
    Jul 13, 2015 @ 12:23
    Mike Chambers
    0

    I've not used in anger... but my understanding is that it's just an abstraction layer over clientdependancy, allowing you to manage in the umbraco admin, rather that doing the coding yourself to create bundles.

    Found this other forum post re bundels and OnApplicationStarted https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/49056-Bundles

    perhaps you could post your code? (are you doing in app_code for JIT or a custom assembly?)

Please Sign in or register to post replies

Write your reply to:

Draft