lit / lit
- воскресенье, 18 июня 2023 г. в 00:00:20
Lit is a simple library for building fast, lightweight web components.
Lit is a simple library for building fast, lightweight web components.
At Lit's core is a boilerplate-killing component base class that provides reactive state, scoped styles, and a declarative template system that's tiny, fast and expressive.
See the full documentation for Lit at lit.dev.
For information about upgrading lit-html 1.x and lit-element 2.x code, see the Lit 2.0 Upgrade Guide.
To install from npm:
npm i litThis is the monorepo for upcoming Lit packages, including lit, lit-html 2.0 and lit-element 3.0.
lit-html 1.x source is available on the lit-html-1.x branch.
lit - The primary user-facing package of Lit which includes everything from lit-html and lit-element.lit-element - The web component base class used in Lit.lit-html - The rendering library used by LitElement.@lit/reactive-element - A low level base class that provides a reactive lifecycle based on attribute/property changes.@lit/localize - A library and command-line tool for localizing web applications built using Lit.@lit/localize-tools - Localization tooling for use with @lit/localize.@lit-labs/ssr - A server package for rendering Lit templates and components on the server.@lit-labs/ssr-client - A set of client-side support modules for rendering Lit components and templates on the server using @lit-labs/ssr.@lit-labs/eleventy-plugin-lit - A plugin for Eleventy that pre-renders
Lit components using @lit-labs/ssr with optional hydration.@lit-labs/react - A React component wrapper for web components.@lit-labs/router - A router for Lit.@lit-labs/task - A controller for Lit that renders asynchronous tasks.@lit-labs/motion - Lit directives for making things move@lit-labs/scoped-registry-mixin - A mixin for LitElement that integrates with the speculative Scoped CustomElementRegistry polyfill.lit-starter-ts (template
repo) - A starter repo for building reusable components using Lit in TypeScript.lit-starter-js (template
repo) - A starter repo for building reusable components using Lit in JavaScript.tests - Test infrastructure for the monorepo.benchmarks - Benchmarks for testing various libraries in the monorepo.@lit-internal/scripts - Utility scripts used within the monorepo.Lit is open source and we appreciate issue reports and pull requests. See CONTRIBUTING.md for more information.
Initialize repo:
git clone https://github.com/lit/lit.git
cd lit
npm ciBuild all packages:
npm run buildTest all packages:
npm run testRun benchmarks for all packages:
npm run benchmarksSee individual package READMEs for details on developing for a specific package.