locked
Project css/js library dependency management RRS feed

  • Question

  • User310927902 posted

    I am using asp.net core 2.1.1 and until recently, I have never done anything elaborate enough to warrant not using bower (while it lasts). However as my projects become more elaborate and use several libraries, I struggle with knowing what is a more scalable solution. The issues I see are:

    1. Using bower packages almost always means I cannot use SRI when I redirect non development instances to CDNs.
      1. Note that this works nicely with source control, I can exclude the wwwroot/lib directory and use the pkg mgr to repopulate it on a fresh pull.
    2. I have to manage the link/script imports in partials that bring in the libs (cant see this ever going away though).

    So, recently on a project that needs to work on hosts both with and without internet access, I had to ensure the local copies were equivalent to the ones on a given CDN so SRI worked as expected, so I dumped bower and I manually pulled the copies locally and removed the gitignore on wwwroot/libs. With libs like fontawesome, now I am checking in huge amounts of wasteful data.

    Certainly this problem has been solved, what are more experienced users doing?

    Thursday, July 5, 2018 1:36 AM

All replies

  • User1520731567 posted

    Hi Ritmo2k,

    Firstly, what is SRI?

    Finally,there is no better solution in fact.

    If work on hosts both without internet access,we could only use packages,

    else if work on hosts both with internet access,we can use CDNs.

    Best Regards.

    Yuki Tao

    Friday, July 6, 2018 10:11 AM