We are currently looking at frameworks to help us as we rewrite our global platform. We've been looking closely at Vue.js, React and Angular, with the former two looking like they would be a good fit for our projects and team. Essentially we would like whichever framework we choose to help us on more complex stateful pages like the menu.
Once we've gone further down this path, we'll no doubt have more to write up here!
If you need to add any 3rd party library code, it should be placed in a libs folder within the JS folder for that project.
The aim across all our projects is to keep our JavaScript as lightweight as possible. Therefore, before adding a library, think about the value it is giving the project and weigh it up against its filesize footprint. The import-cost plugin for Sublime or VSCode can help give better visibility over additional dependency weight.
Currently, we use the following libraries:
We use Qwery to provide developers a simple DOM selection utlility. We access it through the f-dom
module, which provides a very small abstraction layer on top of Qwery – this makes it much easier to change selector engine further down the line should we wish to.
Qwery itself is extremely lightweight. Essentially all it does is select DOM elements by providing selection criteria (similar to other selector libraries such as Sizzle – jQuery's selector engine).