fune/toolkit/content/vendor/lit
2022-11-07 15:04:24 +00:00
..
index.mjs Bug 1798911 - Setup lit for development of toolkit widgets r=hjones 2022-11-03 21:32:34 +00:00
LICENSE
lit-html-no-inner-html.patch Bug 1798911 - Setup lit for development of toolkit widgets r=hjones 2022-11-03 21:32:34 +00:00
moz.yaml
package-lock.json Bug 1799207 - Part 1: Fix installing lit on Windows r=hjones 2022-11-07 15:04:24 +00:00
package.json Bug 1799207 - Part 1: Fix installing lit on Windows r=hjones 2022-11-07 15:04:24 +00:00
README.md

Vendoring for lit

lit can be used to help create Web Components.

The lit.all.mjs bundle

The lit package is imported in a vendoring step and the contents are extracted into the lit.all.mjs file. This has some differences from using lit in a regular npm project. Imports that would normally be into a specific file are pulled directly from the lit.all.mjs file.

eg.

// Standard npm package:
import { LitElement } from "lit";
import { classMap } from "lit/directives/class-map.js";

// Using lit.all.mjs (pathing to lit.all.mjs may differ)
import { classMap, LitElement } from "../vendor/lit.all.mjs";

## To update the lit bundle

Using `mach`s `npm` you can update the bundle with:

cd toolkit/content/vendor/lit ../../../../mach npm run vendor


Then commit the changes.