Answer the question
In order to leave comments, you need to log in
How do styles and scripts interact in BEMjson?
I have been writing combat projects on BEM-naming for a very long time. Recently it was advised to start using BEM full stack with the bemjson templating engine and enb. I smoke Yandex manuals and it seems to be clear, but I'm missing one point.
Did I understand the logic correctly?
There is desktop.bundles. It stores page templates in json format.
There is desktop.blocks. Blocks and their elements are stored there. More precisely their javascript and css.
I created the page, wrote the simplest header markup. In desktop.blocks I created a header, put header.styl there.
In the page, I connected header.css, which, in theory, should fall to my desktop.bundles. But for some reason it doesn't compile or crash. Although in .enb/make.js the enb-stylus configuration is definitely correct. There are no errors in the console. Also, enb says:
17:16:18.369 - build finished - 121ms
----- /desktop.bundles/page/page.html 134ms
17:16:18.426 - build started
17:16:18.435 - build finished - 12ms
----- / desktop.bundles/page/header.css 12ms
But /desktop.bundles/page/header.css is not in the result. It is not created. Error /desktop.bundles/page/header.css 404 not found in the browser console.
Help me understand - how to correctly connect styles and scripts to the page in bemjson?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question