GustavoFernandes / order-splitter

https://gustavofernandes.github.io/order-splitter/
MIT License
3 stars 3 forks source link

Templating HTML in JavaScript #21

Open jonsmithers opened 7 years ago

jonsmithers commented 7 years ago

MustacheJS is a simple 9KB templating system. Might be worth pulling in to avoid crazy string concatenations.

Edit: HandlebarsJS can be precompiled. Maybe that will allow for a small download size.

Edit: VueJS can also be precompiled at a small size!!

The template-to-virtual-DOM compiler and the runtime can be separated, so you can pre-compile templates and ship your app with only the runtime, which is less than 12kb min+gzip (as a reference, React 15 is 44kb min+gzip)

jonsmithers commented 7 years ago

This guy made an experimental, super-fast, "VanillaJS" front-end framework in 0.96kb.

https://hackernoon.com/how-i-converted-my-react-app-to-vanillajs-and-whether-or-not-it-was-a-terrible-idea-4b14b1b2faff#.c3yu3kwm0

It's a good read.

You can see his demo site here: https://knowitall-9a92e.firebaseapp.com/

jonsmithers commented 7 years ago

Maybe just use Polymer to encourage small contributions from people we know?