DEV Community

Nozomu Ikuta
Nozomu Ikuta

Posted on

Exploring How lit-html Works: Introduction

In this series, How lit-html works, I will explore (not explain) internal implementation of lit-html.

Before diving into actual code, it will be good to see overview of the contents of /src directory.

Name Description
directives/ In this directory, built-in directives are defined.
lib/ In this directory, actual internal logics are implemented.
polyfills/template_polyfill.ts As written in the comment in the file, it is defined that a lightweight polyfill that supports minimum features to cover lit-html use cases.
test/ In this directory, files to test lit-html features.
env.d.ts Interfaces of ShadyCSS, ShadyDOM, and Window are defined.
lit-html.ts This is the main file, in which html and svg functions are defined.

From the next post, I will cover each directory and file so that we can understand what happens inside the library.

Top comments (0)