At present, the mainstream development framework of the front end
Yes Vue、React as well as Angular etc.
But developers don't use these frameworks
For many projects
Maybe the traditional way is more suitable
So today I will introduce 10 Big open source template engine
According to different scenarios or functional features
You can choose different template engines to apply to the project
Art-template Is a simple and super fast template engine
The template rendering speed can be optimized through the technology of range pre declaration
meanwhile , It supports NodeJS And browser .
Friendly debugging ： grammar 、 The runtime error log is accurate to the line of the template ; Support breaking points on template files (Webpack Loader)
Support template inheritance and sub template
Browser version only 6KB size
The focus is on V8 and Nodejs Next performance .
It's right Node.js And browsers show great performance
.doT.js Fast , Small and independent .
And node.js The server-side environment ,
RequireJS Module loaders like that and all Web Browser compatibility .
Support webpack and fis. Provides a set of template syntax ,
You can write a template block .
Every time data is passed in ,
Generate... Generated by the corresponding data HTML,
Show different effects .
Can be pure HTML Format data template .
Can be found in Safari,Chrome,FireFox,
Opera and Internet Explorer 6+ Run in
Claim to have embedded CoffeeScript The grammatical
Excellent performance , Template cache ,
Automatically reloads the changed templates and the CoffeeScript Code
.dom from React.js Borrowed some concepts ( For example, reusable components and virtual DOM),
Function to copy them with minimal footprint .
The size of the library does not exceed 512 Bytes . Is making great use of ES6 standard .
Template7 It's the first one to have something similar Handlebars grammar
It's in Framework7 As the default template engine .
It's super lightweight ( Shrink and compress into 1KB about ) And run fast ( Than mobile Safari Medium Handlebars fast 2-3 times ).
BunnyJS It's the original of modern times JS and ES6 Library and the next generation front-end framework ,
Small independent component package without dependency .
It has no dependency - It can be used in any project anytime, anywhere
Configurable and powerful fast template engine .
It's in ExpressJS Open the box , The full version is only about 2.2KB.