How to connect third-party libraries in bem / project-stub?

  • 0
    Good afternoon, in a short time you need to understand how bem works)) downloaded https://github.com/bem/project -stub and installed, downloaded jquery and owl-carousel via bower, it is not clear how to connect them when building pages. Thank you
    JavaScript Anonymous, Aug 4, 2020

  • 1 Answers
  • 0
    Oh ... In short will not work. Firstly, the project-stub is not a starter kit for quickly creating a website from scratch, but rather a demonstration of the concept of bem-tools (XJST-template engine, enb-collector, etc.). https://github.com/bem/bem-express is more suitable for website development, but and it has a higher entry threshold: there is close work with express.js, that is, it is also a full-fledged server on node.js.



    jQuery is already included in the delivery of both project-stub and bem-express, since a framework from the stack for working with client-side JS i-bem.js works with jQuery.



    There are two ways to connect third-party libraries:




    1. hardcode the library as described in the instructions and call initialization yourself;

    2. make a BEM module that uses the Y-Modules system to dynamically connect.





    The second method is preferable, but also an order of magnitude more complicated.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!