diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /toolkit/content/vendor/lit/README.md | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/content/vendor/lit/README.md')
-rw-r--r-- | toolkit/content/vendor/lit/README.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/toolkit/content/vendor/lit/README.md b/toolkit/content/vendor/lit/README.md new file mode 100644 index 0000000000..138c28a8b0 --- /dev/null +++ b/toolkit/content/vendor/lit/README.md @@ -0,0 +1,46 @@ +# Vendoring for lit + +[lit](https://lit.dev/) 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 + +Vendoring runs off of the latest tag in the https://github.com/lit/lit repo. If +the latest tag is a lit@ tag then running the vendor command will update to that +version. If the latest tag isn't for lit@, you may need to bundle manually. See +the moz.yaml file for instructions. + +### Using mach vendor + +``` +./mach vendor toolkit/content/vendor/lit/moz.yaml +hg ci -m "Update to lit@<version>" +``` + +### Manually updating the bundle + +To manually update, you'll need to checkout a copy of lit/lit, find the tag you +want and manually run our import commands. + + 1. Clone https://github.com/lit/lit outside of moz-central + 2. Copy *.patch from this directory into the lit repo + 3. git apply *.patch + 4. npm install && npm run build + 5. Copy packages/lit/lit-all.min.js to toolkit/content/widgets/vendor/lit.all.mjs + 6. hg ci -m "Update to lit@<version>" |