The purpose of this document is to document why certain choices have been made.
To improve the readability and maintainability of our HTML, we've chosen to use lodash templates. These can be found in the templates folder.
The templates are precompiled using lodash-cli, this means the HTML is compiled into javascript. To see this in action look at the compiled template.js file.
Other options for the template language were underscore templates, mustache or handlebars. We decided against using mustache because it's options were limited for dynamic templating. We decided on using lodash because it is comparable to the other options and we were already planning on using lodash for other parts of our library.
We considered different module styles when introducing modules: AMD, node style and ES6 style. We decided against using AMD
because we don't need any asynchronous operations. ES6 style modules are still very much in their infancy so for now we use node style modules until we think we can switch to
To provide a minified javascript file that can be included as is we use browserify to inline all the required dependencies. Browserify looks at the require
calls and adds these dependencies in the concatenated file.