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

therefore JavaScript The front-end template engine will be very useful

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

1、Art-template

Art-template Is a simple and super fast template engine

The template rendering speed can be optimized through the technology of range pre declaration

It achieves proximity JavaScript Extreme runtime performance

meanwhile , It supports NodeJS And browser .

Have access JavaScript Performance at render limits

Friendly debugging : grammar 、 The runtime error log is accurate to the line of the template ; Support breaking points on template files (Webpack Loader)

Support Express、Koa、Webpack

Support template inheritance and sub template

Browser version only 6KB size

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


2、DOT

For the quickest , The most concise JavaScript Template function ,

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 .

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


3、JavaScript-Templates

Fast and powerful JavaScript template engine , Zero depends on .

And node.js The server-side environment ,

RequireJS Module loaders like that and all Web Browser compatibility .

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


4、Template.js

JavaScript template engine , Simple and easy to use ,

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 .

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


5、Tempo

Tempo It's a simple , Intuitive JavaScript Rendering engine ,

Can be pure HTML Format data template .

Separation of concerns :JavaScript Not in file HTML,

HTML None of them JavaScript; Handle with ease AJAX / JSON Content ,

Can be found in Safari,Chrome,FireFox,

Opera and Internet Explorer 6+ Run in

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


6、 ECT

Claim to have embedded CoffeeScript The grammatical

One of the fastest JavaScript template engine .

Excellent performance , Template cache ,

Automatically reloads the changed templates and the CoffeeScript Code

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


7、Dot Dom

.dom from React.js Borrowed some concepts ( For example, reusable components and virtual DOM),

And try to use ES6 javascript

Function to copy them with minimal footprint .

The size of the library does not exceed 512 Bytes . Is making great use of ES6 standard .

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine



8、 Template7

Template7 It's the first one to have something similar Handlebars grammar

Mobile priority JavaScript template engine .

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 ).

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


9、Bunny

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

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


10、 Squirrelly

Squirrelly It's using JavaScript The modern realization ,

Configurable and powerful fast template engine .

It's in ExpressJS Open the box , The full version is only about 2.2KB.

 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


 Dry cargo is full. | 10 An excellent open source JavaScript template engine


Javascript The template engine is relatively large , From performance 、 simplicity 、 Ease of use and other aspects will be different , Developers can choose an appropriate template engine for project development or refactoring according to different perspectives ,Enjoy it!